How to resize text on android according to screen -


i working on android application in want set text size according screen. using following method, not re-sizing text size according screen.

myrequesttext.settextsize(convertfromdp(21));//myrequesttext textview public float convertfromdp(int input) {         final float scale = getresources().getdisplaymetrics().density;         return ((input - 0.5f) / scale);     } 


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -