0

I am working on an APP Which supports both phones and tablets. Phones it is working fine but when i run the same in 7" tablet the seekbar looks weird ...

can anybody help me with this

enter image description here

This the custom xml i have used to show the seekbar

    <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item
        android:id="@android:id/background"
        android:drawable="@drawable/progress_unselected">

    </item>
    <item
        android:id="@android:id/secondaryProgress"
        android:drawable="@drawable/secondary_progress">
    </item>
    <item
        android:id="@android:id/progress"
        android:drawable="@drawable/progress_selected">
    </item>

</layer-list>

My seekbar is inside a RelativeLayout with android:layout_alignParentBottom="true"

<SeekBar
    android:id="@+id/SeekBarTestPlay"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_above="@+id/adView"
    android:layout_alignParentBottom="true"
    android:layout_marginLeft="5.0dip"
    android:layout_marginRight="10.0dip"
    android:max="99"
    android:paddingBottom="10.0dip"
    android:progressDrawable="@drawable/progressbar"
    android:thumb="@drawable/progress_indicator"
    android:thumbOffset="0.0dip" />
Jeffy Lazar
  • 1,903
  • 13
  • 20

1 Answers1

0

You need to make this background nine patch and make dither true. This gives perfect background without break.

 <item android:id="@android:id/background">
        <nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
            android:src="@drawable/seek"
            android:dither="true" />
</item>
Arth Tilva
  • 2,496
  • 22
  • 40