Translations:Android Training/Building a Simple User Interface/5/en: Unterschied zwischen den Versionen
Neue Version von externer Quelle importiert |
K FuzzyBot verschob die Seite Translations:Android Training/Eine einfache Benutzeroberfläche erstellen/5/en nach Translations:Android Training/Building a Simple User Interface/5/en, ohne dabei eine Weiterleitung anzulegen: Teil der übersetzbare… |
||
(kein Unterschied)
|
Aktuelle Version vom 18. Dezember 2015, 03:24 Uhr
Create a Linear Layout[Quelltext bearbeiten]
- In Android Studio, from the
res/layout
directory, open theactivity_my.xml
file.- The BlankActivity template you chose when you created this project includes the
activity_my.xml
file with a RelativeLayout root view and aTextView
child view.
- The BlankActivity template you chose when you created this project includes the
- In the Preview pane, click the Hide icon to close the Preview pane.
- In Android Studio, when you open a layout file, you’re first shown the Preview pane. Clicking elements in this pane opens the WYSIWYG tools in the Design pane. For this lesson, you’re going to work directly with the XML.
- Delete the
<TextView>
element. - Change the
<RelativeLayout>
element to<LinearLayout>
. - Add the
android:orientation
attribute and set it to"horizontal"
. - Remove the
android:padding
attributes and thetools:context
attribute.