nerdexam
Android

OA0-002 · Question #112

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

The correct answer is B. findViewById(int id). See the full explanation below for the reasoning.

Question

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

Options

  • AfindViewByReference(int id);
  • BfindViewById(int id)
  • CretrieveResourceById(int id)
  • DfindViewById(String id)

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    73% (19)
  • C
    4% (1)
  • D
    15% (4)

Community Discussion

No community discussion yet for this question.

Full OA0-002 Practice