Complex example of ListView getItemViewType()

view full story

http://stackoverflow.com – I have a ListView that is complex in that there are possible scenarios for 4 view types e.g. { book, movie, music cd, concert } Currently, to decide on what object to inflate etc, I get the item that relates to the list row. I will then do a switch() on the type field of the object. This has left me with a lot of code and heavy lifting in the getView(). Am I correct in saying that getItemViewType() is used to return the correct view type for the current item? Where would I find an example of a ListAdapter that uses this approach? Note: this is in an attempt to smooth out my ListView that i (HowTos)