I seem to be having trouble using relative links to display buttons. They stick together, like buttons overriding each other, and I've tried to get them to not stick, but to no avail.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:background="@drawable/formation"
android:layout_height="fill_parent" >
<Button
android:layout_weight="1.0"
android:layout_gravity="bottom"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Laws" />
<Button
android:layout_weight="1.0"
android:layout_gravity="bottom"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Qualifications of a naval officer" />
<Button
android:layout_weight="1.0"
android:layout_gravity="bottom"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Code of Conduct" />
</RelativeLayout>
while creating any xml file, keep in mind that every widget is unique by its id, so first of all you have to assign id to each widget.
Now, here you are using Relative Layout. so every widget you added here will relate to each other.
Now see this code, i did change in your code.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:background="@drawable/formation"
android:layout_height="fill_parent" >
<Button
android:id="@+id/btn1"
android:layout_weight="1.0"
android:layout_gravity="bottom"
android:layout_alignParentTop="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Laws" />
<Button
android:id="@+id/btn2"
android:layout_gravity="bottom"
android:layout_below="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Qualifications of a naval officer" />
<Button
android:id="@+id/btn3"
android:layout_gravity="bottom"
android:layout_below="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Code of Conduct" />
</RelativeLayout>
So all button will display one by one.