AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 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?

Show Answer
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

1 comment
Sign in to comment
MmadiOption: B
Dec 31, 2022

B. findViewById(int id)