android - SeekBar thumb (9 patch) not recognized -


i have following code seek bar

<seekbar     android:id="@+id/sbcardspeed"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_weight="1"     android:layout_marginright="5dp"     android:max="100"     android:progress="50"     android:secondaryprogress="0"     android:progressdrawable="@drawable/seekbar_progress"     android:thumb="@drawable/seek_thumb" /> 

seek_thumb 9 patch image file called seek_thumb.9.png. problem drawable not recognized , thumb not shown. when remove .9. file name thumb shown black guide lines

any idea why or how fix this?

nine-patch png files exclusively used background of widgets, such background of button. seekbar thumb not being drawn background. have expected nine-patch png still work, apparently doesn't.

the standard seekbar thumb image not nine-patch, not need resized way button background does. hence, i'd stick standard png files different states, , reference them appropriate statelistdrawable pointing png files.

you can find stock drawables in $sdk/platforms/$version/data/res/, $sdk wherever android sdk installed on development machine , $version api level. standard statelistdrawable actual seekbar thumb should in drawable/, while pngs used statelistdrawable in various density-dependent directories (e.g., drawable-hdpi/) seek_thumb_normal.png, seek_thumb_pressed.png, , seek_thumb_selected.png.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -