Introduction to Android relativelayout, framelayout usage Analysis _android

Source: Internet
Author: User

This article describes the use of Relativelayout and Framelayout in Android. Specifically as follows:

Relativelayout is a layout arranged according to the relative position, which is opposite to the absolutelayout of this absolute coordinate layout.

The controls in the Relativelayout layout contain rich arrangement attributes:

Layout above: Select ID A, the control is above the A control, Layout below, Layout to left of. and the same usage. When using the Relativelayout layout, it is best to layout in the interface design, make changes to the layout of the control when the program is running, because the attributes within the Relativelayout layout are easily conflicting, for example, Layout below, Layout Above ID A, then there must be a conflict.

Framelayout, as the name implies, is related to frames, all the controls in the layout are placed in the upper-left corner of the layout, and one layer is covered.

Framelayout layout inside the control layout properties, which is the key to Layout_gravity, is responsible for controlling the location of the control.

As for the common situation of framelayout layout, readers can learn more in the following study.

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.