views:

1263

answers:

2

In Listview i can change the divider image using "android:divider=image" but i want to display different divider images for different items how can i do that ?

+1  A: 

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.

Dave Webb
I am using custom Listview contains complicated view actually i need divider but in few items i want to replace divider with special divider lines.
Faisal khan
A: 

AFAIK there is no means to have different dividers in different locations in a single list. Either follow Mr. Webb's recommendation (i.e., put the "dividers" in the list items), or keep a consistent divider, or perhaps subclass/reimplement ListView to provide the functionality you seek.

CommonsWare