だから私はアンドロイドプログラミングの初心者で、3つの画像ボタンを1列に並べて配置しようとしています。
問題は、それらの間のスペースを取り除くことができず、 *android:layout_marginLeft="0dp"* と *android:layout_marginRight="0dp"* をそれぞれに追加しても機能しないことです。相対レイアウトを使用しています。
助けてくれてありがとう!
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" >
<ImageButton
android:id="@+id/ib_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_margin="0dp"
android:src="icon2" />
<ImageButton
android:id="@+id/ib_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:layout_toLeftOf="@id/ib_3"
android:src="icon2" />
<ImageButton
android:id="@+id/ib_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/ib_2"
android:layout_margin="0dp"
android:src="icon1" />