Here is the screenshot of my custom Android scrollbar.

Below you can download source code of this sample Android project

Custom Vertical Scrollbar for ListView in Android

Custom Vertical Scrollbar for ListView in Android

How do the same.

It is so simple. To make custom scrollbar for ListView or ScrollView, etc. you need set android:scrollbarThumbVertical or android:scrollbarThumbVertical for in screen layout. Example:

    <ListView
        android:id="@+id/listView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbarThumbVertical="@drawable/thumb">
    </ListView>

Also it can be used with ScrollView, etc.

Here you can download source code of sample Android project.

Download it from github

2 Comments

shilpa · 3 November, 2014 at 11:29

Can you upload the snippet to add an onclick handler for the scrollbar image?

Leave a Reply to Igor Khrupin Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.