Layout mit verschiebbare Tasten

  • Antworten:2
Moriba
  • Forum-Beiträge: 4

18.05.2011, 09:25:26 via Website

Hallo Liebe User und Entwickler,
ich habe eine LineareLayout mit Eingabefeldern und eine Taste "Speichern" in untere Rand der Seite.
wenn ich im Eingabefelder schreibe, erschneint die Bildschirmtastatur. Die Tastatur verdeckt aber meine Taste "Speichern". ich muss immer die Taste "Zurück" drucken um die Tastatur zu schliessen.

wie kann ich meine Layout erstellen, dass die Taste Speichern oberhalb der Tastatur (falls die Tastatur offen) und am untere Rand (bottom) falls die Tastatur geschlossen ist.

vielen Danke

— geändert am 18.05.2011, 09:26:08

Antworten
Maximilian O
  • Forum-Beiträge: 990

18.05.2011, 21:30:40 via App

hallo, du kannst doch wenn das textfeld ausgewählt ist, da gibts nen listen für, den Button verschieben.
mfg Maximilian

Vergiss nie wieder Geburtstage, oder viel schlimmer, deinen Hochzeitstag - Birthdays Download

Antworten
Moriba
  • Forum-Beiträge: 4

19.05.2011, 23:43:18 via Website

Hier meien Layout ich möchte beim editieren der edittext dass, die Button Speichern und Abbrechen zu sehen ist. und nicht nach schliessen der Tastatur

1<?xml version="1.0" encoding="utf-8"?>
2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:orientation="vertical"
4 android:layout_width="fill_parent"
5 android:layout_height="fill_parent"
6 android:id="@+id/viewPrincipal"
7 android:paddingLeft="10dip"
8 android:paddingRight="10dip"
9 >
10<TextView
11 android:layout_width="fill_parent"
12 android:layout_height="wrap_content"
13 android:gravity="center"
14 style="@style/TextGross"
15 android:text="Neue Aufgabe"
16 />
17<TextView
18 android:layout_width="fill_parent"
19 android:layout_height="wrap_content"
20 android:text="Aufgabenname"
21 />
22<EditText
23 android:id="@+id/ed_taskname"
24 android:layout_width="fill_parent"
25 android:layout_height="wrap_content"
26 android:gravity="top|left"
27 >
28</EditText>
29<TextView
30 android:layout_width="fill_parent"
31 android:layout_height="wrap_content"
32 android:text="Comment"
33 />
34 <EditText
35 android:layout_height="wrap_content"
36 android:imeActionLabel="Comment"
37 android:id="@+id/ed_taskcomment"
38 android:layout_width="fill_parent"
39 android:singleLine="false"
40 android:lines="2"
41 android:gravity="top|left">
42</EditText>
43<TextView
44 android:layout_width="fill_parent"
45 android:layout_height="wrap_content"
46 android:text="Ort"
47 />
48 <EditText
49 android:layout_height="wrap_content"
50 android:imeActionLabel="Aufgabenort"
51 android:id="@+id/ed_taskort"
52 android:layout_width="fill_parent"
53 android:singleLine="false"
54 android:lines="2"
55 android:gravity="top|left">
56</EditText>
57
58
59 <LinearLayout
60 android:layout_height="wrap_content"
61 android:layout_width="fill_parent"
62 android:orientation="horizontal"
63 android:paddingTop ="5dip"
64 android:gravity="bottom"
65 android:layout_weight="1"
66 android:layout_gravity="center_vertical"
67 >
68 <Button
69 android:id="@+id/bt_abbrechen"
70 android:layout_height="wrap_content"
71 android:layout_width="fill_parent"
72 android:text="abbrechen"
73 android:layout_weight="1"
74 android:onClick="onButtonClik"
75 >
76 </Button>
77 <Button
78 android:layout_height="wrap_content"
79 android:layout_width="fill_parent"
80 android:id="@+id/bt_save"
81 android:text="Speichern"
82 android:layout_weight="1"
83 android:onClick="onButtonClik"
84 >
85 </Button>
86
87
88 </LinearLayout>
89
90</LinearLayout>

Antworten