0

ファイルanyDensityでtrueに設定しました。manifest.xml

イメージを ldpi、mdpi、hdpi、xhdpi、および xxhdpi にスケーリングしました。もちろん、それらはすべてそれぞれのフォルダーにあります。

ここに私の問題の画像があります:

画面 1

さまざまな種類のレイアウトをすべて作成する必要がありますか? たとえばlayout-large、などなど?

ここに私のxmlがあります:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<Button
    android:id="@+id/bBaron"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/baron" />

<Button
    android:id="@+id/bDragon"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/dragon" />

<Button
    android:id="@+id/bBBlue"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/blue" />

<Button
    android:id="@+id/bPBlue"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/bluecopy" />

<Button
    android:id="@+id/bBRed"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/red" />

<Button
    android:id="@+id/bPRed"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/redcopy" />

<TextView
    android:id="@+id/tvTimerDisplay"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="00:00"
    android:visibility="invisible"
    android:textAppearance="?android:attr/textAppearanceLarge" />

<Button
    android:id="@+id/bReset"
    style="?android:attr/buttonStyleSmall"
    android:layout_width="50dp"
    android:layout_height="50dp"
    android:text="Reset"
    android:visibility="invisible" >
</Button>

<ImageView
    android:id="@+id/ivBackground"
    android:layout_width="466dp"
    android:layout_height="672dp"
    android:scrollbars="none"
    android:src="@drawable/summonersrift" />

すでにすべての dpi に変換したのに、すべての画像が同じサイズにならないのはなぜですか?

全体像について:

  • 解像度: 364 X 387
  • mdpi: 486 X 516
  • hdpi: 729 X 774
  • xhdpi: 972 X 1032
  • xxhdpi: 1458 X 1548
4

0 に答える 0