I'm facing this exact challenge this morning! +1

On Wed, Jun 16, 2010 at 11:33 AM, sasq <[email protected]> wrote:

> I've been looking around a lot on how to separate a ListView into
> sections with headers, and all solutions are based on using multiple
> adapters.
>
> I have only a single database query that is ordered by a specific
> field. I want to present this information in a ListView, and insert
> headings whenever the field changes.
>
> For instance, you search a large amount of music files for "love" and
> get a list like this:
>
> == Alice Bung ==
> Love boat
> === Beavers ===
> Lots of Love
> No Love
> Zlovek Zlatan
> === Some other Group ==
> Another song about love
> Yet another song about love
>
> Actually inserting the headers as a second viewtype requires you to
> scan the whole result to get an accurate count.
> The best I've come up with is returning the Header combined with the
> first item as a single view so as to keep the count correct, but then
> selection looks wrong.
>
> Any tips?
>
> -- Jonas
>
>
> --
> 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]<android-developers%[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