android - How to change colour of the thumb in seekbar? -
i have default seekbar
in android app. noticed when thumb
on seekbar
held, turns yellow. instead, want turn blue when held. how can done? apologize if basic question, new android development. thanks.
if don't default thumb, have create own drawable
, can set thumb in code like:
drawable thumb = getresources().getdrawable( r.drawable.mythumb ); seekbar mseekbar = (seekbar) findviewbyid(r.id.myseekbar); mseekbar.setthumb(thumb);
or can set thumb in xml with:
<seekbar ... android:thumb="@drawable/seek_thumb" />
the actual drawable can image, shape, or other kind of drawable possibly desire. if want thumb change appearance when pressed, want create state list drawable
.
Comments
Post a Comment