0

複数のデバイスをサポートするゲームに取り組んでおり、スタート画面があります。同じ画像を1枚添付しました。画像のように、3 つの異なるテキスト (開始、ヘルプ、私たちについて) があります。3 つの異なるボタンをテキストに合わせて調整し、非表示にしてテキストをクリックできるようにします。しかし、それは特定の画面でしか機能せず、複数の画面用に作成する方法を見つけることができません。このために作成したxmlレイアウトコードも添付しました。これを解決するのを手伝ってください...ここに画像の説明を入力

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/start_screen" >

<Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="175dp"
    android:background="#00000000" />

<Button
    android:id="@+id/button2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/button1"
    android:layout_centerVertical="true"
    android:background="#00000000" />

<Button
    android:id="@+id/button3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/button2"
    android:layout_below="@+id/button2"
    android:background="#00000000" />

4

1 に答える 1

1

res ディレクトリで「リソース修飾子」を使用して、さまざまな画面サイズ/密度にさまざまなグラフィックを提供できます。

http://developer.android.com/guide/practices/screens_support.html

http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources

于 2013-01-05T16:03:44.503 に答える