Android Relative Layout Relativelayout description of each property
Relative to the sibling element
android:layout_below= "@id/xxx": Below the specified view
Android:layout_above= "@id/xxx": Above the specified view
android:layout_toleftof= "@id/xxx": On the left side of the specified view
android:layout_torightof= "@id/xxx": On the right side of the specified view
Relative to Parent element
Android:layout_alignparentleft= "true": Left inside the parent element
Android:layout_alignparentright= "true": inside the parent element to the right
Android:layout_alignparenttop= "true": top of parent element inside
Android:layout_alignparentbottom= "true": inside the parent element at the bottom
Alignment
Android:layout_centerinparent= "true": Center layout
Android:layout_centervertical= "true": Horizontal Center layout
Android:layout_centerhorizontal= "true": Vertical Center Layout
android:layout_aligntop= "@id/xxx": consistent with the upper border of the specified view
android:layout_alignbottom= "@id/xxx": Consistent with specified view lower bounds
android:layout_alignleft= "@id/xxx": Consistent with the left edge of the specified view
android:layout_alignright= "@id/xxx": Consistent with the right edge of the specified view
Interval
Android:layout_marginbottom= ""; The distance from the bottom edge of an element
Android:layout_marginleft= ""; The distance from the left edge of an element
Android:layout_marginright = ""; The distance from the right edge of an element
Android:layout_margintop= ""; The distance from the top edge of an element
Android:layout_paddingbottom= ""; The distance from the bottom edge of the parent element
Android:layout_paddingleft= ""; The distance from the left edge of the parent element
Android:layout_paddingright = ""; The distance from the right edge of the parent element
Android:layout_paddingtop= ""; Distance from top edge of parent element
On the difference between margin and padding
Padding is the angle of the parent view that describes the problem, and is the distance between itself and the edge of its parent control. Margin is to stand in their own perspective to describe the problem, and the distance from the side of a component, if there is only one view at the same level, then its effect is basically the same as padding.
650) this.width=650; "src=" Http://images0.cnblogs.com/blog2015/677694/201506/222248132209266.png "/>
Android Relative layout relativelayout each property introduction