I will inform you briefly.
Creating the extends RelativeLayout class implements OnTouchListener
Define strings of alphabets
Find screen height in list view
Creating dianama text views is considered the same as the number of alphabets, text height View ==> screenWidth / alphabets.
Override the onTouch method.
Find the text view that is currently selected // Offset.
Create a handler to dispatch the event to mainList
Calling the Listview setSelectionFromTop method passes the position.
Done ...
source share