开发者

Where can I find a good example of FastScrollView?

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 documenta开发者_运维问答tion 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?


Fast scroll can be used for any list; the most common being the alphabetical lists. You can write your own custom SectionIndexer for other fast scrolling operations such as moving to a list based on some other attribute of your list item (e.g. name, address - where section indexer will be alphabetical, and phone number, address etc where it can be numerical)

P.S. This is more of a comment aimed at matto1990's answer.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜