Summary:
Android: paddingleft: indicates how much space is reserved in this control.
Android: layout_marginleft: the size of the control to the space of the parent control.
<Linearlayout <br/> Android: layout_height = "28px" <br/> Android: layout_width = "fill_parent" <br/> Android: orientation = "horizontal" <br/> Android: gravity = "center_vertical" <br/> Android: paddingleft = "25px" <br/> Android: background = "@ drawable/top_bg" <br/> <imageview <br/> Android: layout_width = "18px" <br/> Android: layout_height = "18px" <br/> Android: src = "@ drawable/manage" <br/> </imageview> <br/> <textview <br/> Android: layout_width = "wrap_content" <br/> Android: layout_height = "wrap_content" <br/> Android: textcolor = "#000" <br/> Android: textsize = "14px" <br/> Android: TEXT = "application" <br/> </textview> <br/> </linearlayout> </P> <p>
Android: paddingleft: indicates how much space is reserved in this control.
<Linearlayout <br/> Android: layout_height = "28px" <br/> Android: layout_width = "fill_parent" <br/> Android: orientation = "horizontal" <br/> Android: gravity = "center_vertical" <br/> Android: layout_marginleft = "25px" <br/> Android: background = "@ drawable/top_bg" <br/> <imageview <br/> Android: layout_width = "18px" <br/> Android: layout_height = "18px" <br/> Android: src = "@ drawable/manage" <br/> </imageview> <br/> <textview <br/> Android: layout_width = "wrap_content" <br/> Android: layout_height = "wrap_content" <br/> Android: textcolor = "#000" <br/> Android: textsize = "14px" <br/> Android: text = "app" <br/> </textview> <br/> </linearlayout>
Android: layout_marginleft:
It refers to the space of the control to the parent control.
Gravity is the center of gravity, which indicates the position of the stop.
Differences between Android: layout_gravity and Android: gravity
From the name, we can see that Android: gravity refers to the element itself, and the text of the element itself is displayed in any place by changing the attribute settings, but not set to the left by default.
Android: layout_gravity is relative to its parent element, indicating where the element is displayed.
For example, "button: Android: layout_gravity" indicates the position of the button on the interface. Android: gravity indicates the position of the word on the button.