I've got a relativelayout with three linearlayouts as children. The last one has a fixed height and has android:layout_alignParentBottom set to "true". While the middle one is properly positioned below the first one, it goes as far as the bottom of the screen, so that its lower part is overlapped by the third one.
What's wrong?
Thanks
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="@+id/category"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/back_btn"
android:layout_width="29dp"
android:layout_height="34dp"
android:layout_gravity="center_vertical"
android:src="@drawable/red_arrow_left" />
<TextView
android:id="@+id/cat_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/category"
android:layout_marginTop="10dp"
android:orientation="horizontal" >
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:cacheColorHint="@android:color/white" />
<TextView
android:id="@+id/android:empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:cacheColorHint="@android:color/white"
android:padding="10dp"
android:text="@string/no_item" />
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/nav_bar"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
//stuff
</LinearLayout>
</RelativeLayout>