Main. xml Description of the simplest Android Application <? Xml version = "1.0" encoding = "UTF-8"?> // Indicates that the text file is described in XML format
<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" // The namespace of the XML description file is the URL
Android: layout_width = "fill_parent" // fill up the upper-Layer Space
Android: layout_height = "fill_parent" // fill up the upper-Layer Space
Android: orientation = "vertical"> // the layout of this interface is arranged vertically from the top to the bottom of the page.
<TextView // display text, which can be set to editable. TextView is a complete text editor. The base class is configured as uneditable.
Android: layout_width = "fill_parent" // The width value fills the entire interface of LinearLayout.
Android: layout_height = "wrap_content" // The height of TextView varies with the number of lines in the text field.
Android: text = "@ string/hello"/> // display the corresponding text
</LinearLayout>
For TextView, see: http://developer.android.com/reference/android/widget/TextView.html
Built-in layout configuration for Android
Name |
Configuration method |
LinearLayout |
Linear layout Configuration |
FrameLayout |
Frame layout Configuration |
TableLayout |
Table layout Configuration |
RelativeLayout |
Relative Layout |
From Alpha's Blog