deimos1988
deimos1988

Reputation: 6086

Android Listview - varying dividerHeight between items

is it possible to have a listview with different values for the android:dividerHeight-attribute between items? For example like this:

listitem 
listitem
listitem

listitem 
listitem 
listitem 

listitem 
listitem 
listitem 

Upvotes: 0

Views: 75

Answers (2)

Niko
Niko

Reputation: 8153

You can add the divider into your listitem and set visibility between GONE and VISIBLE.

Or you can try another approach playing with sections: http://cyrilmottier.com/2011/07/05/listview-tips-tricks-2-section-your-listview/

Upvotes: 1

Blackbelt
Blackbelt

Reputation: 157447

No it is not possible. What you want is achievable with a custom adapter, overriding also

getViewTypeCount() and getItemViewType()

Upvotes: 0

Related Questions