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)- A80% (24)
- B7% (2)
- C10% (3)
- D3% (1)
Community Discussion
No community discussion yet for this question.