android - Custom Seekbar with masking effect with two drawables? -
i using custom seekbar show graph. had done till this. showing graph applying background drawable seekbar. problem is, need set blue 1 progress drawable , need set background of seekbar red graph. when progress happens thumb moves on red area thumb passed should changed blue color masking effect. can 1 tell best possible way this. pictures shown below
after reading questions , answers hope should scenario thing done...
1.create 2 graphs per logic.
2.generate 2 drwables particular bitmaps....
drawable g_bg = new bitmapdrawable(red graph bitmap); drawable g_pg = new bitmapdrawable(blue graph bitmap);
3.and customize seek bar using layer list created through java code.
clipdrawable c=new clipdrawable(g_pg, gravity.left,clipdrawable.horizontal); layerdrawable ld =new layerdrawable (new drawable[]{g_bg,c});
4.apply layer list seekbar.
graphbar.setprogressdrawable(ld);
this should work wanted....thanksss
Comments
Post a Comment