Moderator, Bürokraten, Checkuser-Berechtigte, developer, emailconfirmed, Oberflächenadministratoren, Oversighter, Administratoren
11.008
Bearbeitungen
(Die Seite wurde neu angelegt: „Die EditText und Button Widgets haben als Breite "wrap_content" gesetzt.“) |
(Die Seite wurde neu angelegt: „Das Layout ist aktuell so entworfen, dass beide Widgets, <code>EditText</code> und <code>Button</code>, nur so breit sind, um ihre Inhalte anzeigen zu können,…“) |
||
Zeile 117: | Zeile 117: | ||
'''Hinweis''': Der Button benötigt kein <code>android:id</code> Attribut, da es im Activity-Code nicht referenziert wird. | '''Hinweis''': Der Button benötigt kein <code>android:id</code> Attribut, da es im Activity-Code nicht referenziert wird. | ||
[[Datei:edittext_wrap.png|thumb|Die EditText und Button Widgets haben als Breite "wrap_content" gesetzt.]] | [[Datei:edittext_wrap.png|thumb|Die EditText und Button Widgets haben als Breite "wrap_content" gesetzt.]] | ||
Das Layout ist aktuell so entworfen, dass beide Widgets, <code>EditText</code> und <code>Button</code>, nur so breit sind, um ihre Inhalte anzeigen zu können, wie im Bild zu sehen. | |||
This works fine for the button, but not as well for the text field, because the user might type something longer. It would be nice to fill the unused screen width with the text field. You can do this inside a <code>LinearLayout</code> with the weight property, which you can specify using the [http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#weight <code>android:layout_weight</code>] attribute. | This works fine for the button, but not as well for the text field, because the user might type something longer. It would be nice to fill the unused screen width with the text field. You can do this inside a <code>LinearLayout</code> with the weight property, which you can specify using the [http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#weight <code>android:layout_weight</code>] attribute. |
Bearbeitungen