How do I set the same text size in an Android app?
3 answers
You can use the current screen resolution and the text size will be proportional for each individual device. Thus, you can use something like this:
//get your textView
TextView text = (TextView) findViewById(R.id.titleField);
text.setText("Your title here");
text.setTextSize(65 * getResources().getDisplayMetrics().density);
you can do this for every TextView on your MainScreen. Hope this helps you :)
PS You can find more suggestions for your case here: Text size with different resolutions
0
source to share
please check fooobar.com/questions/74399 / ...
Blockquote
WarrenFaith The compiler accepts both "dip" and "dp", although "dp" is more appropriate for "sp".
0
source to share