A discussion of how a View is measured in Android’s view drawing process with special attention paid to how the parent’s layout parameters, the child’s layout parameters, and the default View onMeasure implementation affects how that child is laid out.
In this lesson you will learn:
The process by which a parent and child determine the child’s size on the screen.
The different classes used by parent and child views to communicate requested sizes and size constraints.
How well the View base class’s onMeasure implementation sizes its content for some combinations of layout parameters.
Why it’s important to implement onMeasure for your own custom views