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
result far