How to show alphabetical letters on side of Android ListView

前端 未结 2 847
有刺的猬
有刺的猬 2020-11-30 22:45

I\'ve looked at a lot of tutorials for making a ListView have the alphabetical letters on the side (like the Contacts list), but they all seem to using a ListActivity class

2条回答
  •  春和景丽
    2020-11-30 22:55

    If I understand you correctly, you want to set fastScrollEnabled=true and that will give you the little thumb scroller on the right. If you want to add a floating letter like the one in contacts, there is a great example in the APIDemos project in List9.java (http://www.devdaily.com/java/jwarehouse/android-examples/platforms/android-2/samples/ApiDemos/src/com/example/android/apis/view/List9.java.shtml)

提交回复
热议问题