Wouter wrote:
> I want to make a listview that has different rows (layouts). I will
> load the data from a webservice and it can be 2 or more layouts i have
> to generate then. I am creating a social network app and want to show
> a stream of the users activity.
> So when he made a comment, make a new friend, this all has to come in
> the same list.. I load 1 XML file with multiple different child
> objects (comment, friend) so i can see which layout i have to use.
> 
> I have saw this at the Brightkite android app:
> 
> http://www.grabup.com/uploads/c278f22e9bd19a2ccac2246ebd85326c.png?direct
> 
> user checked in, posted note --> different rows..
> 
> But I don't know how to do that.. I use a custom adapter for my
> listview but i only can choose one row layout for my list..

Override getView() (or newView() and bindView() if this is a
CursorAdapter or children), and you can do whatever you want.

Here's an excerpt from one of my books that covers this topic:

http://commonsware.com/Android/excerpt.pdf

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to