I have a listview in which there should be different divider height between different rows. So, how can we set the divider height dynamically?
Suppose, I have 10 row
One way would be to make the dividers rows. Set them as not enabled in your isEnabled
adapter method. I do that for section headers, but it is almost the same thing. Another way would be to manually lay out your whole list by implementing onLayout. If the dividers can be empty space, it might work to set top or bottom margins for the root view of your rows. In xml that would be:
android:layout_marginTop='5px'
Otherwise, just make the dividers part of the rows.