Use sp as a block for button text
<Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Button" android:textSize="20sp" android:layout_weight="30" />
If this does not solve your problem, create a folder like
1) layout 2) layout-small 3) layout large 4) layout-xlarge
as suggested by Nikhil, but at the same time consider this
Same as the folders suggested above, you can create folders with different values ββfor each type of screen
1) values ββ2) values ββare small 3) values ββare large ...
create an xml file with the name diameter.xml in each of them and specify the textSize of your button with a link to the resources of the size below:
<Button android:id="@+id/button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Button" android:textSize="@dimen/small_font" android:layout_weight="30" />
This will set the font size according to the screen size.
Hope this will be helpful for you.
source share