Ecton
Ecton

Reputation: 10722

Android ListView alpha scroller for quickly scrolling long list

The Contacts app shows a button on the side of the screen that acts as a little thumb to allow you to quickly scroll the big list. I have a very long list that would benefit from this navigation behavior, but can't find any documentation as to how to enable it.

Is it a behavior that's built into the SDK, or must I write it myself?

Upvotes: 7

Views: 4686

Answers (1)

broschb
broschb

Reputation: 5006

Yes, it is included in the sdk. See here:

http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:fastScrollEnabled

just set this property. If you want to further enhance this like the contacts that shows the letters for the section you are in you can use this.

http://developer.android.com/reference/android/widget/SectionIndexer.html

Upvotes: 16

Related Questions