On Mon, Feb 7, 2011 at 5:43 PM, orbiter <[email protected]> wrote:
> Is it possible to vary the template for the list's row depending on
> the row object's properties?

Sure. You will need to:

1. Implement getViewTypeCount() on your Adapter

2. Implement getItemViewType(), and have some way to determine which
of your layouts is the one to use given only the position

3. Implement getView() (or newView() for CursorAdapter) to use the
appropriate layout.

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

Android App Developer Books: http://commonsware.com/books

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