Thinking about the wide-height caused by layout_width/height
Way One:
The results do not meet expectations.
Operation Result:
Way two:
The results are in line with expectations.
Such as:
the rules for Android control's height :
The controls under Android are not wide by default, and are given a wide height by the parent control.
The general view control is made up of five layouts (ViewGroup control: LinearLayout, Relativelayout, Tablelayout, Framelayout, absolutelayou) to its wide height.
The height of the outermost layout controls, such as LinearLayout, Relativelayout, and so on, is set by the Framelayout control of the Android system. Hierarchyviewer.bat can be viewed under Android-sdk/tools tools, such as:
for the modification scheme of mode one , the following code:
The results of the operation are as follows:
Layout_grivaty and Grivaty
Layout_grivaty points to note when using:
Results such as:
Results such as:
Difference:
android--How to understand the difference between the width of the control and the Layout_grivaty and the Grivaty