What Activity method you use to retrieve a reference to an Android view by using the id attribute of a resource XML?
What Activity method you use to retrieve a reference to an Android view by using the id attribute of a resource XML?
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.
B. findViewById(int id)