I. Differences between Android: gravity and Android: layout_gravity
Android; gravity is the position of its content relative to its own control, while Android: layout_gravity is its position relative to its parent class.
For example, if there is an edittext file, one sets Android: gravity = "center" to center the text in edittext in the edittext component. At the same time, we set the android of edittext: layout_gravity = "right" to center the edittext component in linearlayout. As shown in:
Ii. Differences between Android: padding and Android: layout_margin
Padding is standingParent ViewIt specifies the distance between the content and the parent view. Margin stands onYourselfIt specifies the distance between yourself and other views (up and down). If there is only one view at the same level, the effect is basically the same as that of padding.