7 messages in com.googlegroups.android-developers[android-developers] list adapter for...
FromSent OnAttachments
kingkung29 Apr 2008 12:18 
Mark Murphy29 Apr 2008 12:37 
kingkung29 Apr 2008 15:55 
GodsMoon30 Apr 2008 19:19 
Mark Murphy01 May 2008 04:57 
kingkung01 May 2008 08:59 
Mark Murphy01 May 2008 09:19 
Subject:[android-developers] list adapter for complex dynamic layouts
From:kingkung (king@gmail.com)
Date:04/29/2008 12:18:19 PM
List:com.googlegroups.android-developers

I want to display an array of layouts... each layout has anywhere from 1-3 textviews, depending on how much content is filled in. So the display would basically look like this:

1) <textview A> <textview B> <textview C>

----------------------- 2) <textview A> <textview B>

---------------------- . . .

---------------------- n) <textview A> <textview C>

Is there a simple way to do this through a listAdapter, like ArrayAdapter, etc.? The way I see it, an ArrayAdapter is only able to fill in ALL of the textview A's first, and then all of the textview B's, and then all of the textview C's. But there are clearly some entries which don't have all three text views, and hence the array would leave an empty space for that entry.

I'm not positive how to make it so it does the above.

Hope this question makes sense... any tips would be helpful, thanks!

James