Listview problem

  • Antworten:1
Simon S
  • Forum-Beiträge: 13

20.11.2012, 10:55:26 via Website

Hi Leute!
Ich habe ein eigenes Listview layout, das mit Werten aus einer DB gefüllt wird. Unterhalb der Listview (am unteren Bildschirmrand sollte das immer sein) möchte ich Buttons einfügen, als so ne art menü (dies wird in meiner ganzen app angezeigt). aber wenn ich die einfach in mein listviewlayout packe, dann ist das ja das Layout für einen Eintrag. kann mir bitte jemand helfen??


danke im vorraus

Antworten
Gelöschter Account
  • Forum-Beiträge: 694

20.11.2012, 12:14:19 via Website

Du hast doch zwei Layouts bei einer ListActivity. Eines für die Activity/das Fragment und eines für die individuellen Rows. Häng die Buttons in das Activity/Fragment Layout ans Ende:

1<LinearLayout
2 xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_height="wrap_content"
4 android:layout_width="fill_parent"
5 android:orientation="vertical" >
6
7 <LinearLayout
8 android:layout_height="wrap_content"
9 android:layout_width="fill_parent"
10 android:orientation="horizontal" >
11
12 <!-- Hier die Header Views
13
14 </LinearLayout>
15
16 <ListView
17 android:drawSelectorOnTop="false"
18 android:fastScrollEnabled="true"
19 android:id="@id/android:list"
20 android:layout_height="fill_parent"
21 android:layout_width="fill_parent" />
22
23 <LinearLayout
24 android:layout_height="wrap_content"
25 android:layout_width="fill_parent"
26 android:orientation="horizontal" >
27
28 <!-- Hier die Footer Views
29
30 </LinearLayout>
31</LinearLayout>

Antworten