How to scale progressDrawable to fitxy

196 Views Asked by At

Hi i need a customized seekbar

        <SeekBar
            android:id="@+id/seekBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:progressDrawable="@drawable/volume_bar" />

it works works but it is clipped

clipped background

the resource image looks like that

Original background

how can i scale the drawable into the seekbar?

1

There are 1 best solutions below

0
On BEST ANSWER

my workaround was creating an xml drawable

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
    <solid android:color="@color/seekBarColor" />
    <corners android:radius="@dimen/seekerLineCornerRadius" />
</shape>