Main. xml Description of the simplest Android Application

Source: Internet
Author: User

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

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.