I know, it was discussed already 1000 times, but I can’t adjust the text size for different screen sizes. I try to use ‘sp’ as size units in my custom style:
<style name="CustumButtonStyle" parent="@android:style/Widget.Button">
...
<item name="android:textSize">30sp</item>
...
</style>
In 2.7 QVGA it looks OK:
But in 7in WSVGA it looks like this:

I’ve tried to use both ‘sp’ and ‘dp’ with the same result.
Could you please explain how to make these buttons look the same on any screen?
The full custom button style
<style name="CustumButtonStyle" parent="@android:style/Widget.Button">
<item name="android:background">@drawable/custom_button</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_margin">3dp</item>
<item name="android:textColor">#ffffff</item>
<item name="android:gravity">center</item>
<item name="android:textSize">30sp</item>
<item name="android:textStyle">bold</item>
<item name="android:shadowColor">#000000</item>
<item name="android:shadowDx">1</item>
<item name="android:shadowDy">1</item>
<item name="android:shadowRadius">2</item>
</style>
And in my application theme I have
<item name="android:buttonStyle">@style/CustumButtonStyle</item>
And there is my layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:background="@drawable/grid"
android:gravity="center"
android:orientation="vertical" android:layout_height="fill_parent">
<Button
android:id="@+id/buttonContinue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/continue_game" android:layout_marginTop="3dp" android:layout_marginBottom="3dp"/>
<Button
android:id="@+id/buttonNewGame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/buttonContinue"
android:layout_alignRight="@+id/buttonContinue"
android:layout_below="@+id/buttonContinue"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/new_game" android:layout_marginTop="3dp" android:layout_marginBottom="3dp"/>
<Button
android:id="@+id/ButtonAbout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/buttonNewGame"
android:layout_alignRight="@+id/buttonNewGame"
android:layout_below="@+id/buttonNewGame"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/about" android:layout_marginTop="3dp" android:layout_marginBottom="3dp"/>
@forcelain I think you need to check this Google IO Pdf for Design. In that pdf go to Page No:77 in which you will find how there suggesting for using dimens.xml for different devices of android for Example see Below structure :
for Example you have used below dimens.xml in values.
In other values folder you need to change values for your text size .
Note: As indicated by @espinchi the small, normal, large and xlarge have been deprecated since Android 3.2 in favor of the following:
Declaring Tablet Layouts for Android 3.2