Exam AND-401 All QuestionsBrowse all questions from this exam
Question 44

Which of the following is NOT true about onMeasure() method of class View?

    Correct Answer: D

    The onMeasure() method of the View class does not take three parameters. It only takes two parameters: the width and the height of the view. The purpose of this method is to measure the view and its contents to determine the measured width and the measured height, and it is indeed invoked by the measure() method. When overriding onMeasure(), a developer must call setMeasuredDimension() to store the measured width and height.

Discussion
MmadiOption: D

D. It takes three parameters: the height, width, and the depth of the view.