Separating ListView into Sections using Headers

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Separating ListView into Sections using Headers

Postby jsharkey » Tue Aug 19, 2008 1:21 am

Separating ListView into Sections using Headers

In the new 0.9 SDK, you might have seen ListViews split into sections
using grey header bars with text in them. (Such as the browser
settings list.) This is an excellent UI tool, and can really help
organize activities.

Since there isn't an "official" way of creating these sectioned lists,
I've put together an abstract way of stitching together multiple
Adapters into a single header-ized Adapter.

Example screenshots and code are posted here:
http://www.jsharkey.org/blog/2008/08/18 ... ndroid-09/

Let me know if anyone finds a better way, but this is a start for
now. :)
Attachments
header.jpg
header.jpg (22.33 KiB) Viewed 13889 times
jsharkey
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri Feb 08, 2008 5:22 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests