I am trying to place buttons side by side next to one another in three buttons to one row using a RelativeLayout.
This is the relative layout placed inside a linear layout with the group of buttons
main.xml
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="vertical" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#CC8FD8D8" android:gravity="center" android:orientation="vertical" android:paddingBottom="20px" > </RelativeLayout> </LinearLayout> These are the group of button found inside the layouts
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/snap" android:textColor="#FFFFFF" android:background="#00FFFFFF" android:id="@+id/shutterButton" android:text="SNAP"></Button> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/up" android:textColor="#FFFFFF" android:background="#00FFFFFF" android:id="@+id/Up" android:text="xxxx"></Button> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/ic_action_borrow" android:textColor="#FFFFFF" android:background="#00FFFFFF" android:id="@+id/xxxx" android:text="xxxxx"></Button> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/xxxx" android:textColor="#FFFFFF" android:background="#00FFFFFF" android:id="@+id/xxxx" android:text="xxxx"></Button> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableTop="@drawable/xxxx" android:textColor="#FFFFFF" android:background="#00FFFFFF" android:id="@+id/xxxx" android:text="xxxx"></Button> OUTPUT
Please how can I place the buttons one after another in 3 buttons to one row. Kindly assist!

LinearLayoutsfor this kindLinearLayoutwithorientation="horizontal"would be so much easy. Although if you still wanna useRelativeLayoutuseandroid:layout_toEndOfand/orandroid:layout_toRightOfproperty.