For anyone looking to dynamically add a header to a sorted cursor in a list,
Kostya's suggestion worked brilliantly. In getView override check the column
value you're sorting on of the previous cursor position to determine if you
need to use a regular row or a view which contains both a header
(( blush ))
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
31.07.2010 23:34 пользователь Connick oconn...@gmail.com написал:
For anyone looking to dynamically add a header to a sorted cursor in a list,
Kostya's suggestion worked brilliantly. In getView override check the column
value
Requirement: Display query results in a list with a header view atop each
group. (results grouped from database)
Looking at Mark's MergeAdapter. Wondering if I might be able to use a single
cursor and have each adapter filter on the group field? That a viable
approach?
Cheers,
Stacy
--
You
On Fri, Jul 30, 2010 at 2:29 PM, Connick oconn...@gmail.com wrote:
Requirement: Display query results in a list with a header view atop each
group. (results grouped from database)
Looking at Mark's MergeAdapter. Wondering if I might be able to use a single
cursor and have each adapter filter
Knowing it's possible is enough for me to go on and start digging. :)
Will post back if I figure it out!
On Fri, Jul 30, 2010 at 2:32 PM, Mark Murphy mmur...@commonsware.comwrote:
On Fri, Jul 30, 2010 at 2:29 PM, Connick oconn...@gmail.com wrote:
Requirement: Display query results in a list
Stacy,
You might want to look at the source for Android's built-in email
client. It groups messages by date, i.e. today, yesterday, more
recent.
Don't know for sure if its source is available, but I think it is (K9
mail is based on it).
-- Kostya
30.07.2010 22:32, Mark Murphy пишет:
On
The grouping itself is no problem ...its tossing in the arbitrary view to
act as a header to each group within that list. From the looks of the client
it doesn't use any type of headers in its list ...but thanks for the
suggestion!
On Fri, Jul 30, 2010 at 2:38 PM, Kostya Vasilyev
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
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.
Cheers
S
On Fri, Jul 30, 2010 at 2:53 PM, Kostya
9 matches
Mail list logo