android - Change NumberPicker TextSize -


how set text size of center selected value of number picker ? , when scrolled size of center number should greater others.

i have tried using following code :

public static boolean setnumberpickertextcolor(numberpicker numberpicker, int color) {         final int count = numberpicker.getchildcount();         (int = 0; < count; i++) {             view child = numberpicker.getchildat(i);             if (child instanceof edittext) {                 try {                     field selectorwheelpaintfield = numberpicker.getclass()                             .getdeclaredfield("mselectorwheelpaint");                     selectorwheelpaintfield.setaccessible(true);                     ((paint) selectorwheelpaintfield.get(numberpicker)).setcolor(color);                     ((edittext) child).settextcolor(color);                     ((edittext) child).settextsize(48);                     numberpicker.invalidate();                     return true;                 } catch (nosuchfieldexception | illegalaccessexception | illegalargumentexception e) {                     log.w("setnumberpickertextcolor", e);                 }             }         }         return false;     } 

but after scroll text size returns normal


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -