android - listview fastscroll with alphabet like on iPhone contacts activity
Asked Answered
C

1

0

Hi I am simply trying to implement an iPhone like fastscroll with an alphabetic scrollbar. See here: http://appsreviews.com/wp-content/uploads/2010/08/Cures-A-Z-App-for-iPhone.jpg

Surprisingly I cannot find anything like that for android.

Appreciate any help.

<ListView 
    android:id="@+id/lstItems" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_below="@id/seekbarvalue" 
    android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb" 
    android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track"
    android:scrollbarSize="30dp"
    android:scrollbarStyle="insideOverlay"
    android:fadeScrollbars="false" />

Somebody commented on the subject in other threads: "if you are developing for android, all your apps app widgets should do similar things. No need to copy from iPhone." However, try to explain it to your client, who wants the app to look the same on most phones.enter image description here

Here is how it looks now: UGLY.

Complicity answered 26/2, 2011 at 19:37 Comment(1)
hi, did you find the answer for this questionPuissance
B
1

try adding android:fastScrollEnabled to your ListView in the XML layout, that should get you pretty close to what you need.

Billiards answered 26/2, 2011 at 20:6 Comment(1)
yes but there are three problems: 1. the "fast" scroll bar appears and disapears. 2. it looks very different from what original scrollbar looks like. 3. Now when I modified the scrollbar drawable it does not track the progress anymore. I'm going to edit the post so you can see the xml of the listview.Complicity

© 2022 - 2024 — McMap. All rights reserved.