Eclipse エミュレーターを使用して異なる密度設定でフォント サイズをテストすると、「dp」を使用してサイズを指定しているにもかかわらず、異なるサイズのフォントが表示されます。密度が高いほどサイズが小さくなるのではないかと思っていましたが、密度が高いほどフォントが大きくなることがわかりました。「in」と「mm」を使用してみましたが、密度が高いほどフォントが大きくなるという同じ動作が発生します。これは android:minSdkVersion="10" に基づいています。
異なる密度で同じサイズにスケーリングするようにフォント サイズを設定する方法はありますか?
xml ファイルは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:layout_gravity="center"
android:textColor="@color/orange"
android:textStyle="bold"
android:text="THIS IS A TEST"
android:background="@color/white"/>
</LinearLayout>
残念ながら評判が悪いため、3つのエミュレーター設定のフォントサイズの画像を投稿できません。
ありがとうございました。