Android Training/Building a Simple User Interface/de: Unterschied zwischen den Versionen

Die Seite wurde neu angelegt: „Zwei weitere Attribute, <code>android:layout_width</code> und <code>android:layout_height</code>, sind für alle Views erforderlich, um die Größe fest zu legen.“
(Die Seite wurde neu angelegt: „Illustration, wie ViewGroup Objekte Zweige im Layout bilden und View Objekte beinhalten.“)
(Die Seite wurde neu angelegt: „Zwei weitere Attribute, <code>android:layout_width</code> und <code>android:layout_height</code>, sind für alle Views erforderlich, um die Größe fest zu legen.“)
Zeile 31: Zeile 31:
<code>LinearLayout</code> is a view group (a subclass of [http://developer.android.com/reference/android/view/ViewGroup.html <code>ViewGroup</code>]) that lays out child views in either a vertical or horizontal orientation, as specified by the <code>android:orientation</code> attribute. Each child of a LinearLayout appears on the screen in the order in which it appears in the XML.
<code>LinearLayout</code> is a view group (a subclass of [http://developer.android.com/reference/android/view/ViewGroup.html <code>ViewGroup</code>]) that lays out child views in either a vertical or horizontal orientation, as specified by the <code>android:orientation</code> attribute. Each child of a LinearLayout appears on the screen in the order in which it appears in the XML.


Two other attributes, <code>android:layout_width</code> and <code>android:layout_height</code>, are required for all views in order to specify their size.
Zwei weitere Attribute, <code>android:layout_width</code> und <code>android:layout_height</code>, sind für alle Views erforderlich, um die Größe fest zu legen.


Because the <code>LinearLayout</code> is the root view in the layout, it should fill the entire screen area that's available to the app by setting the width and height to <code>"match_parent"</code>. This value declares that the view should expand its width or height to match the width or height of the parent view.
Because the <code>LinearLayout</code> is the root view in the layout, it should fill the entire screen area that's available to the app by setting the width and height to <code>"match_parent"</code>. This value declares that the view should expand its width or height to match the width or height of the parent view.
11.008

Bearbeitungen