Android Application Development (AND-401) — Question 44
Which of the following is NOT true about onMeasure() method of class View?
Answer options
- A. It measures the view and its contents to determine the measured width and height.
- B. It is invoked by measure().
- C. When overriding this method, a developer must call setMeasuredDimension().
- D. It takes three parameters: the height, width, and the depth of the view.
Correct answer: D
Explanation
Option D is incorrect because the onMeasure() method only takes two parameters: width and height; depth is not a parameter of this method. Options A, B, and C are true statements regarding the functionality and requirements of the onMeasure() method.