2 Fifth layout:

Fifth layout:

Layout structures can be nested layout structure, responsible for the complete design control

1. abslayout absolute layout: Used to describe the controls on the screen coordinates of (x, y) is the upper left corner (0,0)

clip_image002

2. Relative layout: determined according to a relative positional relationship of each sub-elements, often with the use of a linear layout,

clip_image004

3. Frame layout: default in the upper left corner, the follow-up control will cover the front of the control, not commonly used

clip_image006

4. Linearity control: horizontal or vertical direction in accordance with the order of priority control

android: orientation = "vertical" arrangement in the vertical direction

android: orientation = "horizontal" are arranged in the horizontal direction

Weight: horizontal or vertical direction are arranged to control scale

android:layout_weight=”<num>” num数字

clip_image008

5. Table layout: the same used in the high data required table displayed

<TableRow> representative line controls therein are arranged in a row

clip_image009

Android in the unit:

dp: control automatically resize according to screen resolution

Set control text size: sp

match_parent: Before both space and single parent controls the size of the

wrap_content: automatically resize the control based on the content space

Guess you like

Origin www.cnblogs.com/heixiang/p/10985885.html