2

デバイスの配列の画面解像度を設定しようとしましたが、すべての回答を調べて、res/layout-normal、res/layout-largeなどを作成した場合に理解したことから、そこに調整されたレイアウトを配置できますアプリはそれらを自動的にロードします。

これがどのように発生しなかったか...レイアウトとレイアウトフォルダーを作成し、XMLですべてのサイズの使用を許可した後、誰かが何をすべきかを説明してください(デフォルトはそれらすべてだと思いますが)。

ありがとう!

4

1 に答える 1

2

ほんの一例です:

デバイスの解像度-

res/values/dimens.xml(default)

res/values-ldpi/dimens.xml (240*320 and nearer resolution)

res/values-mdpi/dimens.xml (320*480 and nearer resolution)

res/values-hdpi/dimens.xml (480*800 and nearer resolution)

res/values-xhdpi/dimens.xml (720*1280 Samsung s3,Micromax HD canvas etc)

res/values-xxhdpi/dimens.xml (1080*1920 samsung s4,HTC one etc)

タブレット解像度-

res/values-sw600dp/dimens.xml (600*1024)

res/values-sw720dp-land/dimens.xml (800*1280)

<TextView
    android:id="@+id/textView1"
    style="@android:style/TextAppearance.Small"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sample Text - Small" />
<TextView
    android:id="@+id/textView2"
    style="@android:style/TextAppearance.Medium"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sample Text  - Medium" />
<TextView
    android:id="@+id/textView3"
    style="@android:style/TextAppearance.Large"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sample Text  - Large" />
于 2013-09-28T10:21:47.120 に答える