It is intended to inform you that the view or layout should be sized enough to show all its content, including any paddind .
How it works.
The layout design is processed in two passages: "measuring" and "positioning".
Each of the passages runs through the "views tree" from the top to the bottom.
During the "measurement" pass each view in the "tree" informs its size specifications and calculates its size. At the end all views have their dimensions saved.
The "measurement" pass uses the ViewGroup.LayoutParams class to communicate dimensions. It is used by "children" objects to tell "parents" how they want to be measured and positioned. The ViewGroup.LayoutParams base class only describes how large the view wants to be for both width and height.
For each dimension, it specifies one of the following values:
- An exact number.
- MATCH_PARENT, which means that the view wants to be as big as the parent (less padding )
- WRAP_CONTENT means that the view wants to be large enough to include its content (more padding ).
During the "positioning" pass each "parent" view is responsible for positioning each "child" using the calculated sizes in the "measurement" passage.