Question: I'm using custom thumb for ListView:

![thumb](https://i.stack.imgur.com/UOqaL.png)

using style

```
<style name="CustomTheme" parent="@android:style/Theme.NoTitleBar">
    <item name="android:scrollbarThumbVertical">@drawable/scroll_thumb</item>
</style>

```

but in application it looks like:

![issue](https://i.stack.imgur.com/NNkk4.png)

How can I set size of thumb?

**EDIT**

I don't want to use nine-patch image. I'm need to set fixed size to my thumb.

Answer: 
The answer is simple, don't use nine-patch.

I don't define the "android:scrollbarThumbVertical" as a style or theme, define it in the ListView or ScrollView within your xml layout file, like this:

```
<ListView
    android:id="@+id/listView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbarAlwaysDrawVerticalTrack="true"
    android:scrollbarStyle="outsideOverlay"
    android:scrollbars="vertical"
    android:fadeScrollbars="true"
    **android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb"**
    android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track"
    android:scrollbarFadeDuration="500"
    android:scrollbarDefaultDelayBeforeFade="1000">
</ListView>

```

Where it says, "@drawable/scrollbar\_vertical\_thumb", edit that drawable file named scrollbar\_vertical\_thumb to contain the following as the entire drawable:

```
<?xml version="1.0" encoding="utf-8"?>
    <bitmap
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:src="@drawable/ic_launcher"
        android:gravity="center">
    </bitmap>

```

Now what is actually going to be displayed as the thumb on the track will be whatever drawable you put as the source(src). 

In this case it's the basic green android icon called "ic\_launcher". 

Only restriction I have found so far is that the drawable file used as the src needs to be a .png file. It cannot be an .xml file. 

So to be clear, the "ic\_launcher" is actually a file called "ic\_launcher.png"
Your ScrollBar thumb needs to be a 9patch png. Since you don't want it to stretch, you don't need to add any black lines on the edge, just pop it in the Draw 9-patch editor and save it as a .9.png