Layout Probleme

D

dereulenspiegel

Fortgeschrittenes Mitglied
4
Hallo,

Ich hätte in meiner App ganz gerne ein Layout in dem ganz oben eine TextView ist, darunter eine ExpandableListView und darunter ein Spinner der immer ganz unten sichtbar ist. Ich habe bereits einiges ausprobiert. Aber bisher sah es nie so aus wie ich es oben beschrieben habe. Wenn ich die ExpandableListView z.B. in eine ScrollView packe ist die ScrollView entweder nur recht schmal oder gar nicht sichtbar. Ich hoffe einer von euch kann mir helfen.

Ok, das oben genannte Problem konnte ich doch noch mit Hilfe der Weights lösen.
Aber ich habe ein neues. Und zwar habe ich ein TableLayout mit 4 TableRows und innerhalb des TableLayouts aber oberhalb der ersten TableRow eine TextView. Innerhalb der ersten 4 TableRows sind jeweils nebeneinander eine TextView und ein EditText. In der letzten TableRow sind zwei Buttons. Blöderweise stehen die EditTexts und einer der Buttons an der Seite quasi über den Bildschirm hinaus seitdem ich den EditTexts Hints hinzugefügt habe. Sie sollen aber, trotz überlangem Hint auf dem Bildschirm bleiben.
Hier mal das Layout:
<?xml version="1.0" encoding="utf-8"?>

<TableLayout android:id="@+id/TableLayout01" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"><TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:text="@string/configuration_title" android:layout_width="fill_parent"></TextView>

<TableRow android:id="@+id/TableRow02" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="0"><TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/config_username"></TextView><EditText android:text="@+id/EditText01" android:layout_height="wrap_content" android:id="@+id/EditUsername" android:layout_width="fill_parent" android:hint="@string/config_hint_jid" android:lines="1" android:maxLines="1"></EditText></TableRow>


<TableRow android:id="@+id/TableRow03" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="0"><TextView android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/config_password"></TextView><EditText android:text="@+id/EditText01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/EditPassword" android:inputType="textPassword" android:hint="@string/conf_hint_password" android:lines="1" android:maxLines="1"></EditText></TableRow>






<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="0"><TextView android:id="@+id/TextView04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/config_resource"></TextView>
<EditText android:text="@+id/EditText01" android:layout_height="wrap_content" android:id="@+id/EditResource" android:hint="@string/conf_hint_resource" android:maxLines="1" android:lines="1" android:layout_width="fill_parent"></EditText>
</TableRow>





<TableRow android:id="@+id/TableRow05" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_weight="0"><Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_conf_save" android:id="@+id/ButtonConfSave"></Button><Button android:layout_height="wrap_content" android:text="@string/button_conf_cancel" android:id="@+id/ButtonConfCancel" android:layout_width="fill_parent"></Button></TableRow>




</TableLayout>
 
Zuletzt bearbeitet:

Ähnliche Themen

S
Antworten
4
Aufrufe
1.021
Sempervivum
S
R
Antworten
3
Aufrufe
1.656
Ritartet
R
L
Antworten
4
Aufrufe
1.348
lonnie9020
L
Zurück
Oben Unten