> I am looking for some help around ListViews. I would like to use a > ListView to hold a number of rows of data however in between some of > these rows of data may appear a header indicating a new section of > data types. Can someone tell me have they implemented a ListView that > uses multiple layout types and if so how do you determine which layout > type is being passed back in the convertView in order to make sure you > do not try to recast it to the wrong type.
You can use: * Jeff Sharkey's original SeparatedListAdapter (GPL) [http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/] * My updated rendition (GPL) [http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Sections/] * My MergeAdapter, which can be used for this scenario as well (Apache) [http://github.com/commonsguy/cwac-merge] Here is a StackOverflow discussion of the techniques for doing it yourself: http://stackoverflow.com/questions/1660417/android-efficientadapter-with-two-different-views -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

