Android study notes (1) layout

First recommend a good learning video: https://www.bilibili.com/video/av18008899/?p=3

About the interface layout:
1. LinearLayout: Linear layout



id : the identifier of the layout or view or whatever
width height : Layout width height The default unit is dp
background : background
margin : the outer margin
padding : padding
orientation : the layout is horizontal or vertical

Example:

          What needs to be explained is the weight, which is the weight. The smaller the number, the greater the proportion.                                                                              


2. Relative layout

           
toLeftOf layout on the left side of an ID
below layout is below an ID
alignBottom aligns with the lower border of an ID
alignParentBottom aligns with the lower border of the parent space




                               

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325771476&siteId=291194637