これが私が達成しようとしているレイアウトです。したがって、中央揃えと左右揃えの方法は知っていますが、RelativeLayout と組み合わせると、望ましい結果が得られません。マージン/パディングが追加されない限り、TextViews はすべて左に移動します。Left-Right-Center の正しい式がありますが、これらの横にテキストを配置したい場合は機能しません。
<ImageView> <TextView> <ImageView><TextView> <ImageView><TextView>
これが私のレイアウトです(左側にあるため、多くの余白が必要なテキストが1つだけ含まれています:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<ImageView android:id="@+id/reply_button" android:src="@drawable/icons_reply"
android:layout_width="60dp" andorid_layout_alignParentLeft="true" android:layout_height="wrap_content" android:paddingRight="5dp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Reply"
android:layout_alignLeft="@+id/reply_button" android:layout_marginLeft="50dip" android:textSize="12sp"/>
<ImageView android:id="@+id/resend_button" android:src="@drawable/icons_resend"
android:layout_width="60dp" android:layout_height="wrap_content" android:layout_centerInParent="true" android:paddingRight="5dp"/>
<ImageView android:id="@+id/select_button" android:focusableInTouchMode="false" android:focusable="false" android:layout_alignParentRight="true" android:src="@drawable/select_icon"
android:layout_width="60dp" android:layout_height="wrap_content" android:paddingRight="5dp"/>
</RelativeLayout>