I want a Layout like this:

But my code doesn’t work. I can’t achieve this Layout, and I don’t know what is wrong with what I’ve done so far.
Here’s what I have so far — Is the layout_gravity OK? Or does it need to be set it in the RelativeLayout?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dip"
android:layout_gravity="top" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/centerLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_below="@id/topText">
<ImageButton
android:id="@+id/lektionBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/back"
android:layout_gravity="left"/>
<ImageView
android:id="@+id/centerImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:cropToPadding="true"
android:layout_gravity="center"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lektionForwardButton"
android:src="@drawable/forward"
android:layout_gravity="right"/>
</LinearLayout>
<TextView
android:id="@+id/bottomText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dip"
android:layout_below="@id/centerLayout"
android:layout_gravity="bottom" />
</RelativeLayout>
</RelativeLayout>
You don’t need to use gravity or the inner
LinearLayoutat all for this. Instead uselayout_alignParentTop,layout_alignParentLeft,layout_alignParentRight,layout_alignParentBottom,layout_centerInParentandlayout_centerVerticalon the children.It might be useful for you to go through the RelativeLayout tutorial.