开发者

Add bullets to Android's listview

What is the best way to add bullet-like images before text? I can set background, but it wants to stretch it and I can't define if I want it to float left or right. I don't want to add开发者_开发问答 different images, just same style bullets in front of every new string.


If you need images, use the android:drawableLeft XML attribute (or drawableRight, for RTL languages). From code, you can use TextView's setCompoundDrawablesWithIntrinsicBounds.


Consider pre-pending the unicode middle dot character to your string.


I just made a custom listview, couldn't find any other way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜