android - Change NumberPicker fading edge value or change alpha of top/bottom text -


is there way increase fading edge or change top/bottom text alpha of number picker? able extend numberpicker class , change alpha of number picker wheel once start scrolling alpha gets applied center text well. can see, picked hour value , alpha got applied text. want alpha top , bottom number. there way can accomplish this. ?

private void updatetextattributes(string fontname) {     (int = 0; < getchildcount(); i++) {         view child = getchildat(i);         if (child instanceof edittext) {             try {                 field selectorwheelpaintfield = numberpicker.class.getdeclaredfield("mselectorwheelpaint");                 selectorwheelpaintfield.setaccessible(true);                  typeface typeface = typeface.createfromasset(getcontext().getassets(), "fonts/sfuidisplay-" + fontname + ".ttf");                  paint wheelpaint = ((paint) selectorwheelpaintfield.get(this));                 wheelpaint.settextsize(mtextsize);                 wheelpaint.settypeface(typeface);                 wheelpaint.setcolor(mtextcolor);                 wheelpaint.setalpha(50); //it change alpha in beginning once scroll changes center text color                  edittext edittext = ((edittext) child);                 edittext.settextcolor(mtextcolor);                 edittext.settextsize(pixelstosp(getcontext(), mtextsize));                 edittext.settypeface(typeface);                 edittext.setalpha((float) 1.0);                   invalidate();                 break;             } catch (nosuchfieldexception | illegalaccessexception | illegalargumentexception e) {                 e.printstacktrace();             }         }     } } 

design

enter image description here

result far

enter image description here


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo