Android RelativeLayout - как позиционировать?

Я хочу такой макет: Desired layout

Но мой код не работает. Я не могу достичь этого макета, и я не знаю, что не так с тем, что я сделал до сих пор.

Вот что у меня есть на данный момент - все в порядке с layout_gravity? Или его нужно установить в 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>
10
задан CJBS 23 July 2015 в 17:39
поделиться