In my app, I show data in a list view. It looks as below.
Each row in lis
when you have to manage different kinds of views you should override getViewTypeCount()
and getItemViewType()
and you will receive a number of convertViews equals to the int returned by getViewTypeCount()
. For instance, If it returns 2 you will get 2 differents convertView
.
ListView is supposedly used to relieve the coders of some burden when each row has similar repetitive pattern. Yes, for slight variations getViewType
is the correct choice to implement, but I see a better solution to your problem: you should create your own linearlayout if you have a lot of customization requirement. Remember that listview itself is an expensive object to create. Create a custom linearlayout is not that hard.