Thanks Romain,

Thank you for your answer. I would like to use the second method. Can you
please
tell me a little bit more about how to use the two methods you describe.
First of all, which
Adapter class should I subclass (if I need to subclass at all). Can I
subclass SimpleAdapter?
I was able to understand the following code:
http://ykyuen.wordpress.com/2010/01/03/android-simple-listview-using-simpleadapter/but
I am not sure whether I can adapt it to use getItemViewType and
getViewTypeCount.
My rows contain textviews with strings but it seems like I am looking in the
wrong place.

Thanks again,

Regards,

John Goche

On Sat, Sep 17, 2011 at 8:52 PM, Romain Guy <[email protected]> wrote:

> Hi John,
>
> You have to do it programmatically from the adapter. You have two ways of
> doing it. Either you can use a single list item with some of its child views
> marked with a GONE visibility or you can use different list items. The
> preferred solution is the latter. If you decide to use it, you need to
> override getItemViewType() and getViewTypeCount().
>
> Android's XML files do not contain logic.
>
> On Sat, Sep 17, 2011 at 11:47 AM, John Goche 
> <[email protected]>wrote:
>
>>
>> Hello,
>>
>> I need a dynamic list view which has heterogenous row entries.
>> For instance one item may have two text edits whereas another
>> list item may have four text edits. Does this mean I have to do it
>> all programmatically and cannot encode an <if> (say like in Java
>> Apache Tomcat Struts Library) to decide how my list row should
>> appear (with 2 or with 4 text edits)?
>>
>> What other options would I have to do this?
>>
>> Thanks,
>>
>> John Goche
>>
>>  --
>> 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
>
>
>
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
>  --
> 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

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