drawable - Customizing the android seekbar thumb -


i want 1) change color of thumb color int have in code. , 2) make sure there no whitespace between progress , thumb

drawable thumb = getresources().getdrawable(r.drawable.thumb, getcontext().gettheme()); // seekbarcolorstr can #0011ff, etc thumb.setcolorfilter(color.parsecolor(seekbarcolorstr), porterduff.mode.multiply); seekbar.setthumb(thumb); 

my thumb.xml:

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="oval">  <size     android:height="20dp"     android:width="20dp" />  </shape> 

i got idea changing color in how change colour of thumb in seekbar?

the thumb renders black, , since circular while progress rectangular, there whitespace between two.

the proper porterduff mode src_in, not multiply in order render color.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -