On Fri, Jul 30, 2010 at 3:02 PM, Connick <firstname.lastname@example.org> wrote:
I'm with you on that ...re: header part of hierarchy, that's the direction I'm going but I was worried about position mapping ...you're suggestion to include the header view with a row item would solve that problem!
Gracias, will give that a shot.
SOn Fri, Jul 30, 2010 at 2:53 PM, Kostya Vasilyev <email@example.com> wrote:
It does on my phone - Samsung Galaxy S with Android 2.1update1. This is the built-in Android email client, set up with an IMAP account.
I just had an idea.
It should be much easier to implement the header as part of data item view hierarchy. This way the number of items in the list view is exactly the same as the number of items in the cursor, and you can avoid extra code dealing with counting data items and mapping their positions.
You'd have two kinds of list item views - one with the header, one without. Deciding which one to use is pretty simple - in the adapter's getView, compare the item's data with the previous item's. If they differ, you need to use the version with the header.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at