I've got a weird gap in my Android layout. I've set the background colors of my views and layouts so that you can see what is where. The gray box in the middle is the gap. I've got a RelativeLayout overall (white background), with a toolbar at the top (seen in pink), then a LinearLayout which is everything else (seen in yellow). In that yellow layout I've got two children: detail information (seen in blue), and a ListView (seen in red). However, the gray area in the middle... I have no idea where that is coming from.
Here is my layout file (with some info clipped for readability):
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rootView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff"
>
<RelativeLayout
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="44dp"
android:background="@drawable/toolbar_gradient"
android:layout_alignParentTop="true"
android:background="#f0f"
>
<Button style="@style/Button.Done" />
</RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/toolbar"
android:paddingTop="4dp"
android:weightSum="10"
android:orientation="vertical"
android:background="#ff0"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="3.5"
android:weightSum="9"
android:orientation="vertical"
android:background="#00f"
>
</LinearLayout>
<ListView
android:id="@+id/tableView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="6.5"
android:background="#f00" >
</ListView>
</LinearLayout>
</RelativeLayout>
What is happening here? What am I missing?
EDIT: It appears the layout xml may not be the problem. I've been working to reduce and reduce and reduce and find the real culprit. It's looking like my problem exists in the ListAdapter code. Will update more as I discover it.