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

What Activity method you use to retrieve a reference to an Android view by using the id attribute of a resource XML?

    Correct Answer: B

    The findViewById(int id) method is the correct method to retrieve a reference to a view using the id attribute in an Android resource XML. This method looks for a view with the specified ID and returns it if found. The method signature takes an integer as its parameter, which represents the id attribute of the view.

Discussion
MmadiOption: B

B. findViewById(int id)