1, LinearLayout
Android:gravity is the position of the element that adjusts the contents of the elements themselves or the elements that contain them, which are displayed by default on the left side
Android:layout_gravity is relative to its parent element, stating where the element appears in the parent element.
A/linearlayout:vertical
LinearLayout gravity can control the upper and lower positions of sub-view: Bottom, Center,top
Sub view: Layout_gravity Only the horizontal setting will work, and the vertical setting will not work. That is: The left,right,center_horizontal is in force.
Together, the two parameters control the position of the child view in the LinearLayout.
B/linearlayout:hor
Sub view: Layout_gravity Only the vertical setting will work, and the horizontal setting will not work. That is: The top,bottom,center_vertical is in force.
Summary of layouts in Android