AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 102


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)

Show Answer
Correct Answer: AD

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.

Discussion

1 comment
Sign in to comment
MmadiOptions: AD
Dec 31, 2022

A. onMeasure(). D. onSizeChanged().