Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Nooo... the solution is much simpler! You forgot to say you want to say the second linear layout should be above the third one :) Yes, the second linear layout must have BOTH <code>android:layout_below="@+id/category"</code> and <code>android:layout_above="@+id/nav_bar"</code>. I tested it and it works.</p> <p>But of course, you can use weights to archive the same results, it's just going to be harder...</p> <p>Your XML with the change I mentioned (tested it in eclipse):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;LinearLayout android:id="@+id/category" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_alignParentTop="true" android:orientation="horizontal" &gt; &lt;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" /&gt; &lt;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" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@+id/nav_bar" android:layout_below="@+id/category" android:layout_marginTop="10dp" android:orientation="horizontal" &gt; &lt;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" /&gt; &lt;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" /&gt; &lt;/LinearLayout&gt; &lt;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" &gt; //stuff &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload