Androidのレイアウトに奇妙なギャップがあります。ビューとレイアウトの背景色を設定して、何がどこにあるかがわかるようにしました。真ん中の灰色のボックスがギャップです。全体的にRelativeLayout(白い背景)があり、上部にツールバー(ピンクで表示)があり、次に他のすべてのLinearLayout(黄色で表示)があります。その黄色のレイアウトには、詳細情報(青で表示)とListView(赤で表示)の2つの子があります。しかし、真ん中の灰色の領域は...それがどこから来ているのかわかりません。
これが私のレイアウトファイルです(読みやすくするためにいくつかの情報がクリップされています):
<?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>
ここで何が起きてるの?私は何が欠けていますか?
編集:レイアウトxmlは問題ではないようです。私は削減し、削減し、削減し、本当の犯人を見つけるために取り組んできました。私の問題はListAdapterコードに存在するようです。私がそれを発見すると、さらに更新されます。