Im working on an application where I load items from a webservice and display them in a list using ListView. I was wondering if I could have certain "titles" between some of them, and when you scroll through them, they stick to the top of the list, until another "title" comes and takes the spot. An example of this is the Android contacts application:
http://img196.imageshack.us/img196/1440/contactss.png
NOTE: Since I can't post images yet, I posted the direct link
The letters G, H and J. How can I achieve this?
The good thing about Android is you can always look at the application source. It uses a PinnedHeaderListView to implement the behavior you are looking for.
Searching on Google I found a nice code of ListView with sticking categories, also includes a working sample project:
http://code.google.com/p/android-amazing-listview/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With