nerdexam
Android

AND-401 · Question #138

Which of the following is required to allow the Android Developer Tools to interact with your view?

The correct answer is A. Provide a constructor that takes a Context and an AttributeSet object as parameters. See the full explanation below for the reasoning.

Question

Which of the following is required to allow the Android Developer Tools to interact with your view?

Options

  • AProvide a constructor that takes a Context and an AttributeSet object as parameters.
  • BProvide a constructor that takes a Context object as parameter.
  • CExtend class View.
  • DOverride method onDraw() of class View.

How the community answered

(30 responses)
  • A
    80% (24)
  • B
    7% (2)
  • C
    10% (3)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full AND-401 Practice