Android Relativelayout Properties
Relative to the given ID control
Android:layout_above the bottom of the control to the control of the given ID;
Android:layout_below Place the bottom of the control under the control of the given ID;
Android:layout_toleftof aligns the right edge of the control with the left edge of the control for the given ID;
Android:layout_torightof aligns the left edge of the control with the right edge of the control for the given ID;
Android:layout_alignbaseline aligns the baseline of the control with the baseline of the given ID;
Android:layout_aligntop aligns the top edge of the control with the top edge of the given ID;
Android:layout_alignbottom aligns the bottom edge of the control with the bottom edge of the given ID;
Android:layout_alignleft aligns the left edge of the control with the left edge of the given ID;
Android:layout_alignright aligns the right edge of the control with the right edge of the given ID;
Relative to Parent component
Android:layout_alignparenttop If true, aligns the top of the control with the top of its parent control;
Android:layout_alignparentbottom If true, aligns the bottom of the control with the bottom of its parent control;
Android:layout_alignparentleft If true, aligns the left part of the control with the left part of its parent control;
Android:layout_alignparentright If true, aligns the right part of the control with the right side of its parent control;
Center
Android:layout_centerhorizontal If True, the control is placed horizontally centered;
Android:layout_centervertical If True, the control is placed vertically centered;
Android:layout_centerinparent If True, the control is placed in the center of the parent control;
Specify moving pixels
The value of the offset on the android:layout_margintop;
Android:layout_marginbottom the value of the offset;
Android:layout_marginleft the value of the left offset;
Android:layout_marginright the value of the right offset;
---------------------------------------------------------------------------------------------------------------
Framelayout single frame layout, in a single frame layout of the entire interface as a blank alternate area, all the child elements can not be assigned to the position, they are all placed in the upper left corner of the area, and the following child elements directly over the preceding child elements, and the previous child elements part and all obscured.
The size of the framelayout is controlled by the largest child control in all the child controls that it adds. If the child controls are the same size, only the topmost child controls are visible at the same time, and others are obscured (the frame layout is used when the tab design is made). In Framelayout, the child controls are drawn through the stack, so the added child controls are drawn at the top.
Framelayout inherits the ViewGroup class, in addition to inheriting the properties and methods of the parent class, the Framelayout class also contains its own properties and methods:
Android:foreground (Setforeground (drawable)) sets the content drawn on top of all child controls.
Android:foregroundgravity (setforegroundgravity (int)) sets the Gravity property of the content that is drawn on all child controls.
The item in the Framelayout has these properties. (Less pathetic)
(1) Layout_width
(2) Layout_height
(3) Layout_marginleft
(4) Layout_margintop
(5) Layout_marginright
(6) Layout_marginbottom
(7) Layout_gravity
-----------------------------------------------------------------
Here are some of the important attributes that Relativelayout uses:
First Class: Property value is True or False
Android:layout_centerhrizontal Horizontal Center
Android:layout_centervertical Vertical Center
Android:layout_centerinparent is completely centered relative to the parent element
Android:layout_alignparentbottom snaps to the bottom edge of the parent element
Android:layout_alignparentleft snaps to the left edge of the parent element
Android:layout_alignparentright snaps to the right edge of the parent element
Android:layout_alignparenttop snaps to the top edge of the parent element
android:layout_alignwithparentifmissing if the corresponding sibling element cannot be found, then the parent element is the reference.
Second class: The attribute value must be the reference name of the id "@id/id-name"
Android:layout_below at the bottom of an element
Android:layout_above at the top of an element
Android:layout_toleftof on the left side of an element
Android:layout_torightof on the right side of an element
Android:layout_aligntop aligns the top edge of this element with the top edge of an element
Android:layout_alignleft aligns the left edge of this element with the left edge of an element
Android:layout_alignbottom aligns the bottom edge of this element with the bottom edge of an element
Android:layout_alignright aligns the right edge of this element with the right edge of an element
Class III: Attribute values are specific pixel values, such as 30dip,40px
Android:layout_marginbottom distance from the bottom edge of an element
Android:layout_marginleft distance from the left edge of an element
Android:layout_marginright distance from the right edge of an element
Android:layout_margintop distance from the top edge of an element
[Android] Relativelayout, Linearlayout,framelayout