水平方向のリニアレイアウト内に 3 つの imageButtons があり、左上の imageButton のすぐ下にもう 1 つ imageButton を追加したい (左上の imageButton が開始および終了するとき、その下の imageButton にも同じことが必要です)。すべてが垂直線形レイアウトになっています。下のimageButtonを上のimageButtonと垂直に揃えることができません。どうやってやるの?何か案は?
私のコードはこれです:
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:gravity="center">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton11"
android:background="@drawable/image"
android:layout_gravity="center"
android:layout_marginRight="30dp"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton12"
android:background="@drawable/image"
android:layout_gravity="center"
android:layout_marginRight="30dp"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton13"
android:background="@drawable/image"
android:layout_gravity="center"
android:layout_marginRight="30dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:gravity="left">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageButton14"
android:background="@drawable/image"
android:layout_marginRight="30dp"/>
</LinearLayout>