I have an horizontal linear layout with 3 child views.
I want to center the middle child horizontally and make its siblings 8dps to its sides.
Is this the clean way to do so?
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="horizontal">
<include
android:id="@+id/child1"
layout="@layout/child1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|end"
android:maxLines="1" />
<include
android:id="@+id/child2"
layout="@layout/child2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="@dimen/separator_horizontal_margin"
android:layout_marginLeft="@dimen/separator_horizontal_margin"
android:layout_marginEnd="@dimen/separator_horizontal_margin"
android:layout_marginRight="@dimen/separator_horizontal_margin" />
<include
android:id="@+id/child3"
layout="@layout/child3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|start"
android:maxLines="1" />
</LinearLayout>