开发者

create a android contactList view?

Hi i am trying to create a basic contact list that has same functionality has th开发者_StackOverflowe native one i.e. arranged in alphabetical order and have the scrolling thumb tab on the side to scroll through letters.

How do i create that scroll tab thing? i will use some sort of sorting algorithm to sort my contact list in order so that should be fine but im wondering how to do the fast thumb tab scroll seen in the pic below:

create a android contactList view?


After several hours trying to solve this I finally found the incredibly simple answer. Simply enable fastscroll in the layout for the list.

<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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜