Main. XML Description of the simplest Android Application

Source: Internet
Author: User

// indicates that this text file is described in XML format
The namespace of the XML description file is the following URL
Android: layout_width = "fill_parent" // Fill up the entire Upper-layer space
Android: layout_height = "fill_parent" // Fill up the entire Upper-layer space
Android: orientation = "vertical"> // the layout of this interface is arranged vertically from top to bottom.

<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 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 location layout
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.