在ListView
我可以使用android:divider=image
更改分隔android:divider=image
但我想为不同的项目显示不同的分隔符图像,我该怎么做?
Why not have no divider images and make the divider part of the View for each item?
For example, at the top of the view you have a label and an icon and at the bottom you have your divider image.
AFAIK there is no means to have different dividers in different locations in a single list. Either follow Mr. Webb's recommendation (ie, put the "dividers" in the list items), or keep a consistent divider, or perhaps subclass/reimplement ListView
to provide the functionality you seek.
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.