TextView FontSize according to Different Resolution and ScreenSize
android, font-size, textview
Solution
Use the code from Screen Category or use getSize() method like:
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
as described here to get the screen size and and then set the font size accordingly using setTextSize() method, you can also consider using sp unit for font size.
Problem
Here i develop one Android application, which can run on all screen size and resolution devices. But one problem is there my `TextView's` Fontsize is same on all the Screen-Size. I want to change `FontSize` according to Different `ScreenSize` and Screen Resolution. Thanks in Advance.