I am porting an iPhone app over to the Android platform. One of the views has a very large list of data and on the iPhone app, there's a scrollbar of sorts on the right hand side that displays the letters of the alphabet and allows the user to quickly scroll through the list this way. I am having trouble finding such functionality in Android. Is there a simple way to implement this?
I think this is implemented through AlphabetIndexer, though I have not tried it personally.
The Android way to do this is to make the list filterable using the keyboard, like a Blackberry. You should do it this way to fit in with the platform experience.
To implement this, you call the setTextFilterEnabled(boolean textFilterEnabled)
method on your list view. See example below:
myListView.setTextFilterEnabled(true);
For a complete example, see Hello, ListView.
If you can't use that, then you can use the fast scrolling like seen in the Contacts application. This is not a public API yet, but you can implement it from the Contacts source code at https://android.googlesource.com/platform/packages/apps/Contacts .
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