Multiple Layouts in a ListView

by Loki117 » Fri, 06 Nov 2009 06:01:58 GMT


Sponsored Links
 Hey Guys,

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.

Tom

--



Multiple Layouts in a ListView

by Mark Murphy » Fri, 06 Nov 2009 06:10:55 GMT


 > I am looking for some help around ListViews. I would like to use a

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 


--


Sponsored Links


Multiple Layouts in a ListView

by Loki117 » Fri, 06 Nov 2009 06:45:10 GMT


 Great thanks the StackOverflow thread done the trick I did not know
about those overrides.




--



Other Threads

1. Passing data from camera to application

Hi,
I am developing one new camera application, that will not use existing
camera framework at all.
So, then how to render data from camera to the display ???
Is VideoView is feasible to display data ??
If yes, then how to pass raw data( or yuv/rgb data) to VideoView ??

Mohan

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. <Wta> about 3g dogwatcher..

Guys mau nny donk ko 3g dogwatcher saia dr kemaren o,o% trus y usagenya
crnya gimana biar kedetect usage yg uda dipake...
Mhon pencerahannya

-- 
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

3. System Calls in Android

4. Get supported media types ( programatically)

5. Menu Item Name

6. Live coverage of Google's Android phone announcement ( 10:00 PST - 18:00 GMT )

7. How to downgrade T-Mobile G1 from Donut to Cupcake?