Android-Layout mit ListView zwischen einer "top-bar" und "bottom bar"

Ich versuche zu konstruieren, ein layout, wo es eine text-Ansicht auf dem Bildschirm oben und unten Balken am unteren Rand des Bildschirms.
Jede dieser Ansichten soll bleiben fixiert und zwischen der 2 sollte eine ListView.

TOPBAR
LISTVIEW (scrollable)
BOTTOM BAR

Meinem layout (siehe unten) fast funktioniert: die oberen und unteren Komponenten fixiert bleiben und das listview-Schriftrollen. Das "problem" ist, dass die Letzte Zeile meiner ListView bleibt verborgen hinter der unteren Leiste.

Irgendwelche Vorschläge, wie können Sie das layout?

Dank!

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout
            android:layout_alignParentTop="true"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical"
            >
        <TextView
                android:background="@drawable/blackgrad"
                android:gravity="center"
                android:id="@+id/title"
                android:layout_height="50dip"
                android:layout_width="fill_parent"
                android:text="blah blah"
                android:textColor="#ffffff"
                android:textSize="18sp"
                />
        <ListView
                android:background="#ffffff"
                android:cacheColorHint="#ffffffff"
                android:id="@android:id/list"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                />
    </LinearLayout>
    <LinearLayout
            android:background="#efefef"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_width="fill_parent"
            android:layout_height="50dip"
            android:orientation="horizontal">
        <Button
                android:layout_height="wrap_content"
                android:id="@+id/back"
                android:text="Back"
                android:layout_width="wrap_content" />

        <Button
                android:layout_height="wrap_content"
                android:id="@+id/home"
                android:text="Home"
                android:layout_width="wrap_content" />

        <Button
                android:layout_height="wrap_content"
                android:id="@+id/next"
                android:text="Next"
                android:layout_width="wrap_content" />


    </LinearLayout>
</RelativeLayout>

InformationsquelleAutor user141146 | 2010-10-21

Schreibe einen Kommentar