I am working on a Custom Component and would like to know if onMeasure called on children would return width and height of the child including padding and margin of it?
The sizes passed in
onMeasure includes the padding, but not the margin.
So, while implementing your
onMeasure you should keep in mind:
- The padding.
- The minimum width and minimum height of our view (use
getSuggestedMinimumHeight()to get those values).
heightMeasureSpecwhich are the requirements passed to us by the parent.