android - Why does SeekBar customization work on 4.1 but not on 4.2 and 4.3? -
i've created custom seekbar , works perfect 4.1 devices, on 4.2 , 4.3 devices not show background, leaves blank.
this do:
myseekbar.setprogressdrawable(getresources().getdrawable(r.drawable.seekbar_progress)); myseekbar.setbackgrounddrawable(getresources().getdrawable(r.drawable.slider_shape));
seekbar_progress.xml:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <bitmap android:src="@drawable/slider_background_part" android:tilemode="repeat"> </bitmap> </item> <item android:id="@android:id/progress"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <clip> <color xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/my_slider_color"/> </clip> </item> <item> <clip > <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/slider_foreground_part" android:tilemode="repeat"/> </clip> </item> </layer-list> </item>
in file i'm repeating image progress , background, , progress, give color. still need set shape background. if don't this, background remains blank.
slider_shape.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <corners android:radius="0dp"/> </shape>
can me here?
Comments
Post a Comment