1

I would like to remove the space arround the thumb in my Seekbar:

(it's the area between red round and the side of blue rectangle, drawn for this example)

enter image description here

I followed this link but no change: https://stackoverflow.com/a/2925892/3409503

This is the style of the Seekbar:

<style name="MediaSeekBar" parent="android:Widget.SeekBar">
        <item name="android:progressDrawable">@drawable/media_seek_bar</item>
        <item name="android:minHeight">2dp</item>
        <item name="android:maxHeight">2dp</item>
        <item name="android:thumb">@drawable/media_seek_bar_thumb</item>
        <item name="android:thumbOffset">0dp</item>
        <item name="android:progress">0</item>
    </style>

My drawable media_seek_bar_thumb:

All these drawables are PNG.

Community
  • 1
  • 1
anthony
  • 7,653
  • 8
  • 49
  • 101

1 Answers1

7

I had the same issue, and it turned out that there was some transparent padding baked into my .png files. The fix was to set

android:splitTrack="false"

on the Seekbar in the Activity's layout xml. This will force the two track segments to connect behind your thumb drawable.

dupontgu
  • 71
  • 1
  • 2