Article 4 common attributes of layout and controls 1. Attributes of layout controls
Attributes that are easy to understand will not be explained. Here we will look at some attributes that are not very clear ~~
Layout_margin
The distance between the View/control and the parent View margin. The value can be a negative number.
Layout_padding
The content of the control or view and its own margin (internal margin). The top, bottom, left, and right padding refer to the distance between the text in the button and the button border. The default value is 0, and cannot be negative.
Layout_gravity and gravity
Attribute Value: wrap_content and match_parent
Fill_parentThis attribute is changed to match_parent during api level 8 due to the misunderstanding of the name. Currently, the majority of development projects are later than 4.0, so match_parent is used.
Although we can directly specify the width and height of the control, we recommend that you use the wrap_content and match_parent attributes because the screen size of the device cannot be determined.