tags:

views:

69

answers:

2

I have a long "cities" list. I was looking for an equivalent to sectionIndexTitlesForTableView in the iphone world. It provides a way to "jump" to a particular point in long lists without having to scroll through all the elements. I think FastScrollView implements this but it's not part of the API and I can't find any documentation on how to use it. It appears in the baked in contacts application of the device. I want to use this functionality within an AlertDialog. Is this possible?

A: 

Fast scroll is something you can only use in alphabetical lists really. The view which pops up (to show where you are) can only provide space for a single letter. I've looked in the source code for ways to extend it, however lots of the methods needed are protected and can only be used by classes in the same package (the core framework one).

The only thing I can think to do is to just write it all yourself. It's annoying but until Google make it possible for us to extend it via an API that's the best that's possible.

My similar question

matto1990
I am only interested in alphabetical lists (for the time being). The generic version would be nice in other contexts though. Is there good example code for a simple alphabetical list?
Osmund
The easiest way is to just call setFastScroll(true) on your ListView
matto1990
Thanks, I should have read a little closer.
Osmund
No problems! :)
matto1990