简体   繁体   中英

Android Content Area changes (nine-patch background image)

I have a listview that I customized, I add a background image with nine patch with the setBackground method, but the problem is that the content area is not respected I have text that exceeds whereas when I set the property manually the list appears well

what to do to fix this problem?

在此处输入图片说明

在此处输入图片说明

That's not even a valid 9-patch. You should connect the dots on the bottom and right borders (to define your content area), and your 9-patch should be much much smaller than that. All but one pixel of the white space from left to right is redundant and can be removed. Really, this would be better done with a rotated TextView placed in a layout of some sort (Linear, Relative, etc.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM