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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -