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 -

java - Unable to make sub reports with Jasper -

Integrity error when loading fixtures for Selenium testing in Django -