Scrolling to Item
I'm new to Android and I want to know how to scroll down to a position specified by a button in ListView
. Say for example I have an array of 5000 items, sorted. I will have 33 letters on to开发者_Python百科p of the screen and user wants to get to position that starts with letter 'M'. How can I make it so that user can get to that position without using fingers to scroll.
I know it is possible in HTML (<li>
/<ul>
tags) but I would like to know how this can be done in Android ListView
.
Do it by using the method smoothScrollToPosition()
You only have to know the index, but that would be no problem in a sorted list.
精彩评论