<?xml version= "1.0" encoding= "Utf-8"?>
<!--
Android:layout_above the bottom of the control to the control of the given ID
Android:layout_below the top of the control to 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 the baseline of the control's baseline and the given ID of the control
Android:layout_alignbottom the bottom edge of the control with the bottom edge of the given ID control
Android:layout_alignleft aligns the left edge of the control with the left edge of the given ID control
Android:layout_alignright aligns the right edge of the control with the right edge of the given ID control
Android:layout_aligntop aligns the top edge of the given control with the top of the given ID control
Android:alignparentbottom if the value is true, align the bottom of the control with the bottom of the parent control
Android:layout_alignparentleft if the value is true, align the left side of the control with the left side of the parent control
Android:layout_alignparentright if the value is true, align the right side of the control with the right side of the parent control
Android:layout_alignparenttop if the value is true, aligns the top of the space with the top of the parent control
Android:layout_centerhorizontal if the value is true, the control will be in the horizontal direction of the central
Android:layout_centerinparent if the value is true, the control will be centered on the horizontal and vertical direction of the parent control
Android:layout_centervertical if the value is true, the control will be in the vertical direction of the central
Android:padding and Android:layout_margin Popular understanding Padding for the inner border, margin for the outer box
The difference between android:padding and android:layout_margin, in fact the concept is very simple, padding is standing in the angle of the parent view to describe the problem, it specifies that its contents must be the distance from the parent view boundary. Margin is to stand in their own perspective to describe the problem, and other (up and down) the distance between the view, if there is only one view at the same level, then its effect is basically the same as padding.
android:layout_gravity= "Center"
The Android:gravity property is the qualification for the view content. For example, a button above the text. You can set the text on the left side of the view, on the right, and so on.
Android:layout_gravity is used to set the position of the view relative to the parent view. For example, a button in the LinearLayout, you want to put the button on the left to the right and so on can be set by this property.
Alignment of the Android control