创建一个android contactList视图?

时间:2010-10-13 07:33:47

标签: android

您好我正在尝试创建一个具有相同功能的基本联系人列表,具有原生的联系人列表,即按字母顺序排列,并在侧面滚动缩略图选项卡以滚动字母。

如何创建滚动标签?我将使用某种排序算法按顺序对我的联系人列表进行排序,这样就可以了,但我想知道如何在下面的图片中看到快速拇指标签滚动:

alt text

1 个答案:

答案 0 :(得分:2)

经过几个小时试图解决这个问题后,我终于找到了非常简单的答案。只需在列表的布局中启用fastscroll即可。

<ListView
        android:id="@id/android:list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:fastScrollEnabled="true"
    /> 

http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:fastScrollEnabled