Neil,

If your data is sitting in an in-memory collection, you can still use my pattern, and in fact it's even easier.

Derive your adapter from BaseAdapter, override getViewTypeCount, getItemViewType, and getView.

Make a small change to isNewGroup, and get the previous data item from the in-memory data structure (for data key comparison).

For efficiency, I recommend you use an array to hold your data objects, as that allows direct access to elements by index.

-- Kostya

18.11.2010 13:10, Neilz пишет:
Hi Kostya. It's making sense to me now, thanks for the tip.

The only thing I need to know now: I need to pass my List a Collection
of custom objects, not a Cursor. So for example I have a standard
object with getName(), I want to pass a List of these and the name
element is what appears on the list item.

Is your code suitable for this, or would I need a completely different
type of Adapter?

On Nov 16, 11:02 pm, Kostya Vasilyev<[email protected]>  wrote:
This won't work right - you still want to get clicks on the data portion of
a layout that starts a new group.
  Developers" ...



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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