ボタンのテキストのサイズに問題があります。weightSum を使用するレイアウトがあり、ボタンの幅は親と一致し、高さは 30% です。すべて正常に動作しますが、エミュレータで画面のサイズを変更すると、テキストがまだ小さいです。画面のサイズに応じてテキストのサイズを変更するにはどうすればよいですか? これはxmlです:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="100" >
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button"
android:layout_weight="30" />
</LinearLayout>
これを自動的に行う方法はありますか?