On Mon, Nov 15, 2010 at 8:12 AM, Neilz <neilhorn...@gmail.com> wrote:
> It seems to me that you must have your list content already separated
> before adding them to the ListView. So, you add one Array, then you
> add a different View, then you add another Array.

That's what MergeAdapter does. As I hinted at earlier in this thread
(I think), you'd need a different approach to do headings based on,
say, a change in some column of a Cursor.

> I can probably find a way to sort my data in this way, although I was
> hoping to add the view on the fly. My data is currently returned as
> one long List, and I don't know in advance where these separator views
> are going to go. I need to study the contents of my data as it's added
> to the View, and say "Ah, here's some condition, add a separator view
> here". Does that make sense, and can this be done?

Yes and yes, though probably not easily. You might consider Kostya's
approach. Creating a CursorHeadingAdapter or some such is on my
18,000-item to-do list.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to