Five major layouts and process flows in Android

Source: Internet
Author: User

1, the first description of the five major Android layout:


1. Absolute layout: absolutelayout (layout components according to absolute coordinates)


2, Relative layout: relativelayout (relative to other components of the layout method)


3, Linear layout: LinearLayout (according to the vertical or horizontal layout of the components , through the "Android:orientation" property can set the direction of the linear layout.)

There are two types of property values: Vertical (vertical) and horizontal (horizontal).

android:orientation: You can set the orientation of the layout

android:gravity: Used to control the alignment of components

layout_weight: Controlling the relative size of each component in the layout


4. Frame layout: framelayout (component from upper left of screen layout component)


5. Table layout: tablelayout (layout components by row and column)


2, the process of Android development flow:


(1) in the Androidmanifest.xml file, navigate to the activity class by configuring the action tag and category label configuration to jump to the class.


(2) Find the corresponding value in R.java by this class. Jump to the corresponding activity_main.xml in layout by value.


(3) The Activity_main.xml configuration file Android:text to find the corresponding value by name and output in the application. (If you set the value directly in the Android:text, it will not jump, but it will be output directly on the application).



Note: Printing through the System.out.println () method in the activity class is not output to the application


This article is from the "Beginner" blog, so be sure to keep this source http://10154241.blog.51cto.com/10144241/1663844

Five major layouts and process flows in Android

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.