3

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 top 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.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Jay Berd
  • 105
  • 5

1 Answers1

1

Do it by using the method smoothScrollToPosition()

You only have to know the index, but that would be no problem in a sorted list.

Matt
  • 74,352
  • 26
  • 153
  • 180
berlindev
  • 1,753
  • 14
  • 22