// Relative to the given ID Control
Android: layout_above: place the bottom of the control on the control with the given ID;
Android: layout_below: place the bottom of the control under the control with the given ID;
Android: layout_toLeftOf align the right edge of the control with the left edge of the control with the given ID;
Android: layout_toRightOf align the left edge of the control with the right edge of the control with the given ID;
Android: layout_alignBaseline: Align the baseline of the control with the baseline of the given ID;
Android: layout_alignTop: Align the top edge of the control with the top edge of the given ID;
Android: layout_alignBottom: Align the bottom edge of the control with the bottom edge of the given ID;
Android: layout_alignLeft: Align the left edge of the control with the left edge of the given ID;
Android: layout_alignRight: Align the right edge of the control with the right edge of the given ID;
// Relative to the parent component
Android: layout_alignParentTop if it is true, align the top of the control with the top of its parent control;
Android: layout_alignParentBottom: If this parameter is set to true, the bottom of the control is aligned with the bottom of its parent control;
Android: layout_alignParentLeft: if it is true, align the left of the control with the left of its parent control;
Android: layout_alignParentRight: if it is set to true, align the right of the control with the right of its parent control;
// Center
Android: layout_centerHorizontal if true, place the control horizontally in the center;
Android: layout_centerVertical if true, place the control vertically in the center;
Android: layout_centerInParent if true, place the control in the center of the parent control;
// Specify the moving Pixel
Android: layout_marginTop offset value;
Android: layout_marginBottom offset value;
Android: layout_marginLeft value of the left offset;
Android: value of the right offset of layout_marginRight;
Android: layout_toRightOf = "@ + id/XX" // the left of the current view is aligned with the right of XX
Android: layout_abve
Android: layout_below
Android: layout_toLeftOf
Android: padding = "5px "//
Android: paddingLeft = "15.0sp" // The internal padding (text, image, etc.) of the current view is 15sp from the Left Border of the current view.
Android: layout_marginLeft = "5.0px" // The Left Border of the current view is 5.0px away From the view on the left.
Android: layout_marginRight = "5.0px"
Android: layout_marginBottom = "5.0px" // bottom
Android: layout_marginTop = "5.0px"
Example:
Android: layout_below = "@ id /***"
Android: layout_alignBaseline = "@ id /***"
Android: layout_alignParentTop = true
Android: layout_marginLeft = "10px"
/* ----------------------------- Split line ------------------------------------------------*/
Android: id -- specify the corresponding ID for the control
Android: text -- specify the text displayed in the control. Note that strings in the strings. xml file should be used as much as possible here.
Android: textSize -- specifies the font size in the control.
Android: background -- specifies the background color used by the control. The RGB naming method # FFFFFF or @ android: color/white
Android: width -- specify the width of the control
Android: height -- specify the height of the control
Android: sigleLine -- if set to true, the control content can only be displayed in the same row
Android: grimace -- specify the basic position of the content in the control, such as center and right
Android: Location of the layout_gravity control relative to the parent View
// This attribute value is a numeric value in units and can be used in all views.
Android: padding -- specify a certain amount of internal space for the control.
Android: paddingLeft -- specify the internal space on the left of the control.
Android: paddingTop -- specify a certain amount of internal space on the top of the control
Android: paddingRight -- specify the interior of the control on the right to leave a certain amount of space
Android: paddingBottom -- specify a certain amount of internal space under the control
// This attribute value is a numeric value in units and can be used in all views.
Android: layout_margin -- specify the external spaces around the control.
Android: layout_marginLeft -- specify the external area on the left of the control to leave a certain amount of space.
Android: layout_marginTop -- specify the external area on the top of the control to leave a certain amount of space.
Android: layout_marginRight -- specify the external part on the right of the control to reserve some space.
Android: layout_marginBottom -- specify the exterior of the control to leave a certain amount of space
// This property value is a reference id and can only be used in the relative layout.
Android: layout_above: Align the bottom of the control with the upper part of the control with the given ID
Android: layout_below: Align the upper part of the control with the lower part of the control with the given ID
Android: layout_toLeftOf align the right of the control with the left of the control with the given ID
Android: layout_toRightOf align the left of the control with the right of the control with the given ID
// This property value is a reference id and can only be used in the relative layout.
Android: layout_alignTop: Align the upper part of the control with the given ID
Android: layout_alignBottom: Align the lower part of the control with the given ID
Android: layout_alignLeft: Align the left of the control with the given ID
Android: layout_alignRight: Align the right side of the control with the given ID
Android: layout_alignBaseline the baseline of the control is aligned with the baseline of the control with the given ID
// This property value is a reference id and can only be used in the relative layout.
Android: alignParentBottom if the value is true, the bottom of the control is aligned with the bottom of the parent control.
Android: layout_alignParentLeft if the value is true, the left side of the control is aligned with the left side of the parent control.
Android: layout_alignParentRight if the value is true, the right side of the control is aligned with the right side of the parent control.
Android: layout_alignParentTop if the value is true, the top of the space is aligned with the top of the parent control.
Android: layout_centerHorizontal
Android: layout_centerInParent if the value is true, the control is centered in the horizontal and vertical directions of the parent control.
Android: layout_centerVertical if the value is true, the control will be centered in the vertical direction
<! --
<LinearLayout>
Linear layout configuration. In this label, all components are lined up from top to bottom.
-->
<! --
Layout_weight is used to assign importance values to multiple views in a linear layout. All views have a layout_weight value,
The default value is 0, indicating the size of the screen space occupied by the view to be displayed.
If a value higher than zero is assigned, the free space in the parent view is split. The split size depends on the layout_weight of each view.
The value and the ratio of the value to the overall layout_weight value of the current screen layout and the layout_weight value of other view layout_weight values.
For example, we have a text label and two text editing elements in the horizontal direction. The text tag does not specify the value of layout_weight,
Therefore, it occupies the minimum space required. If the layout_weight value of each of the two text editing elements is set to 1, the two are equally divided.
The remaining width of the layout in the parent view (because we declare that the importance of the two is equal ). If the value of layout_weight in the first of the two text editing elements is set to 1,
If the second value is set to 2, 2/3 of the remaining space is allocated to the first space, and 1/3 to the second Space (the smaller the value, the higher the importance ).
-->