0
1行目に3つのイメージボタンがあり、2行目に3つのイメージボタンがあります。 相対レイアウトと線型レイアウトの組み合わせで実装しようとしましたが、どういうわけか、各行に1つのイメージボタンと合計6行で終了しています。イメージボタンを相対レイアウトと線形レイアウトの中に配置することができません
誰かが第1行の3つのイメージボックスと第2行の3つのボックスを整列させる手助けをしてくれますか?
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="app.com.date.design.drawer.AddImagesFragment">
<!-- TODO: Update blank fragment layout -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/layout1"
android:baselineAligned="false"
android:orientation="vertical">
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/common_full_open_on_phone"
android:id="@+id/image1" />
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/common_full_open_on_phone"
android:id="@+id/image2" />
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/common_full_open_on_phone"
android:id="@+id/image3" />
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/common_full_open_on_phone"
android:id="@+id/image4" />
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/common_full_open_on_phone"
android:id="@+id/image5" />
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/common_full_open_on_phone"
android:id="@+id/image6"
android:layout_weight="0.05" />
</LinearLayout>
</RelativeLayout>
</FrameLayout>
ありがとうございました。 – user7327850
welcome :) :) :) :) –