TabHost mit FrameLayout unter LinearLayout
Ich habe da ein kleines problem mit einer xml-Datei und ein TabHost mit einem FrameLayout, das zeigt eine ListActivity. Eine kleine LinearLayout ist am unteren Rand, aber dieser ist immer vor der ListActivity so gibt es Elemente in der ListActivity hinter dem LinearLayout auch beim scrollen der ListView nach unten. Ich habe versucht, so viele Kombinationen von verschiedenen Layouts, aber ich konnte keine Lösung finden 😐
Vielleicht hast du ja eine Idee?
Dank!
Diesem Bild könnte erklären, mein Anliegen: http://img822.imageshack.us/i/listactivity.png/
Und hier ist der xml-code:
<?xml version="1.0" encoding="utf-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="#231f20">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="There are items behind me..." />
<Button
android:id="@+string/connect"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Connect"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"/>
</LinearLayout>
- Können Sie mir die komplette demo ?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Können Sie erreichen, was Sie wollen, indem Sie ein RelativeLayout:
Hier ist ein Beispiel für ein layout, das ich in einer meiner apps:
Hier, mein LinearLayout ist am top auf dem Bildschirm, aber das ist leicht zu beheben. Sie werden wahrscheinlich wollen, um die Verwendung
layout_weight
wie hier gezeigt.