tomte
- Forum-Beiträge: 36
18.01.2014, 10:40:26 via Website
18.01.2014 10:40:26 via Website
Hallo, liebe Leut', die Struktur soll sein:
- LinearLayout, vertikal, mit:
- - ListView
- - LinearLayout, horizontal, mit:
- - - 4 Buttons
Peinlich aber wahr: Wenn ich im Layout-XML das LinearLayout mit den Buttons oberhalb der ListView angebe, funktioniert das.
Sobald ich aber wie geplant das LinearLayout mit den Buttons unterhalb der ListView angebe, erscheinen die Buttons nicht mehr.
Hier der XML-Code:
Liebe Gruesse
tomte
- LinearLayout, vertikal, mit:
- - ListView
- - LinearLayout, horizontal, mit:
- - - 4 Buttons
Peinlich aber wahr: Wenn ich im Layout-XML das LinearLayout mit den Buttons oberhalb der ListView angebe, funktioniert das.
Sobald ich aber wie geplant das LinearLayout mit den Buttons unterhalb der ListView angebe, erscheinen die Buttons nicht mehr.
Hier der XML-Code:
1<?xml version="1.0" encoding="utf-8"?>
2<!-- activity_edit_kriterien.xml V.2014-01-18
3 fuer EditKriterienActivity -->
4<LinearLayout
5 xmlns:android="http_//schemas.android.com/apk/res/android"
6 xmlns:tools="http_//schemas.android.com/tools"
7 android:orientation="vertical"
8 android:layout_width="match_parent"
9 android:layout_height="match_parent"
10 tools:context=".EditKriterienActivity" >
11
12 <ListView android:id="@+id/editKriterienListView"
13 android:layout_width="match_parent"
14 android:layout_height="match_parent" >
15 </ListView>
16
17 <LinearLayout
18 android:orientation="horizontal"
19 android:gravity="top"
20 android:layout_width="wrap_content"
21 android:layout_height="wrap_content" >
22
23 <Button
24 android:id="@+id/endButton"
25 style="?android:attr/buttonStyleSmall"
26 android:layout_width="80dp"
27 android:layout_height="36dp"
28 android:text="@string/end" >
29 </Button>
30
31 <Button
32 android:id="@+id/cancelButton"
33 style="?android:attr/buttonStyleSmall"
34 android:layout_width="80dp"
35 android:layout_height="36dp"
36 android:text="@string/cancel" >
37 </Button>
38
39 <Button
40 android:id="@+id/backButton"
41 style="?android:attr/buttonStyleSmall"
42 android:layout_width="80dp"
43 android:layout_height="36dp"
44 android:text="@string/back" >
45 </Button>
46
47 <Button
48 android:id="@+id/okButton"
49 style="?android:attr/buttonStyleSmall"
50 android:layout_width="80dp"
51 android:layout_height="36dp"
52 android:text="@android:string/ok" >
53 </Button>
54
55 </LinearLayout>
56
57</LinearLayout>
Was mache ich falsch?2<!-- activity_edit_kriterien.xml V.2014-01-18
3 fuer EditKriterienActivity -->
4<LinearLayout
5 xmlns:android="http_//schemas.android.com/apk/res/android"
6 xmlns:tools="http_//schemas.android.com/tools"
7 android:orientation="vertical"
8 android:layout_width="match_parent"
9 android:layout_height="match_parent"
10 tools:context=".EditKriterienActivity" >
11
12 <ListView android:id="@+id/editKriterienListView"
13 android:layout_width="match_parent"
14 android:layout_height="match_parent" >
15 </ListView>
16
17 <LinearLayout
18 android:orientation="horizontal"
19 android:gravity="top"
20 android:layout_width="wrap_content"
21 android:layout_height="wrap_content" >
22
23 <Button
24 android:id="@+id/endButton"
25 style="?android:attr/buttonStyleSmall"
26 android:layout_width="80dp"
27 android:layout_height="36dp"
28 android:text="@string/end" >
29 </Button>
30
31 <Button
32 android:id="@+id/cancelButton"
33 style="?android:attr/buttonStyleSmall"
34 android:layout_width="80dp"
35 android:layout_height="36dp"
36 android:text="@string/cancel" >
37 </Button>
38
39 <Button
40 android:id="@+id/backButton"
41 style="?android:attr/buttonStyleSmall"
42 android:layout_width="80dp"
43 android:layout_height="36dp"
44 android:text="@string/back" >
45 </Button>
46
47 <Button
48 android:id="@+id/okButton"
49 style="?android:attr/buttonStyleSmall"
50 android:layout_width="80dp"
51 android:layout_height="36dp"
52 android:text="@android:string/ok" >
53 </Button>
54
55 </LinearLayout>
56
57</LinearLayout>
Liebe Gruesse
tomte
— geändert am 18.01.2014, 10:44:07