ListView with non-selectable seperator

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

ListView with non-selectable seperator

Postby gnunn » Thu Jun 18, 2009 7:46 pm

I am using a SimpleCursorAdapter to show a list of items sorted by date in a ListView. What I would like to do is have the date be a non-selectable seperator under which all the records for that date would be grouped. For example:

Monday 22 June 2009
- Info 1
- Info 2

Tuesday 23 June 2009
- Info 1
- Info 2

Using an ExpandableListView might be one option by tweaking it accordingly, but I was wondering if there was a more elegant way to do this. I saw Jeff Sharkey's article which did something similar by having a single adapter hold nested sub adapters, I'd prefer not to use that approach since it would involve opening multiple cursors or creating seperate data structures which wouldn't be very efficient.
gnunn
Freshman
Freshman
 
Posts: 3
Joined: Sat Jun 13, 2009 7:51 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google Feedfetcher and 14 guests