Which of the following are layout-related methods called by the framework on views, and you can override them when customizing a view? (Choose two)
Which of the following are layout-related methods called by the framework on views, and you can override them when customizing a view? (Choose two)
onMeasure() and onSizeChanged() are both layout-related methods that can be overridden when customizing a view. The onMeasure() method is called during the layout pass to determine the size requirements for the view, whereas onSizeChanged() is called when the size of the view has changed. These methods allow the view to manage its layout configuration. On the contrary, onDraw() is related to rendering the view, and onKeyUp() is related to handling keyboard input, not layout customization.
A. onMeasure(). D. onSizeChanged().