0

タイル パズルを作成するアプリにしばらく取り組んでいます。さまざまなサイズと密度の画面をテストするところまで来ました。Krita を使用して、mdpi 形式で使用するためにタイル画像を 110 X 110 ピクセルに縮小しました。奇妙なことに、これまでテストに使用してきた xhdpi エミュレーターではこのサイズで問題なく動作しましたが、作成した mdpi エミュレーターでは画像が大幅に縮小されます。小さい画面密度用に大きな画像を作成することはできましたが、ドキュメントからアンドロイドが密度を処理する方法について私が理解していることを無視しています。これらの画像は、低解像度で拡大されるべきではありませんか? レイアウト ファイルのグリッド レイアウト部分は次のとおりです。

    <GridLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:columnCount="3"
    android:rowCount="3"
    android:id="@+id/TheGrid"
    android:layout_centerInParent="true"
    android:background="@color/background_floating_material_light"
    android:animateLayoutChanges="true"
    android:layout_toRightOf="@+id/title_inflater"
    android:layout_toLeftOf="@+id/picture_inflator"
    >

    <ImageView
        android:id="@+id/TopLeft"
        android:clickable="true"
        android:layout_column="0"
        android:layout_row="0"
        android:layout_gravity="fill"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />
    <ImageView
        android:id="@+id/TopCenter"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="0"
        android:layout_column="1"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />
    <ImageView
        android:id="@+id/TopRight"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="0"
        android:layout_column="2"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />


    <ImageView
        android:id="@+id/CenterLeft"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="1"
        android:layout_column="0"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />

    <ImageView
        android:id="@+id/CenterCenter"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="1"
        android:layout_column="1"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />
    <ImageView
        android:id="@+id/CenterRight"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="1"
        android:layout_column="2"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />

    <ImageView
        android:id="@+id/BottomLeft"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="2"
        android:layout_column="0"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />
    <ImageView
        android:id="@+id/BottomCenter"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="2"
        android:layout_column="1"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />
    <ImageView
        android:id="@+id/BottomRight"
        android:clickable="true"
        android:layout_gravity="fill"
        android:layout_row="2"
        android:layout_column="2"
        android:src="@drawable/star_trek_federation_emblem_9pc_1"
        />

    <ImageView
        android:id="@+id/mover"
        android:layout_row="2"
        android:layout_column="2"
        android:visibility="invisible"
        android:layout_gravity="fill"
        />
</GridLayout>

これは、プレビューアでどのように見えるかです (xhdpi 画面でどのように見えるか):

ここに画像の説明を入力

ただし、mdpi 画面では次のようになります。

ここに画像の説明を入力

やみくもに画像を調整する前に、なぜこれが起こっているのか知りたいのですが、さまざまなエミュレーターを作成してWebを検索するのに1日を費やした後、立ち往生しています。どんな助けでも大歓迎です。

4

1 に答える 1