Android Application Development (AND-401) — Question 52

Which of the following is correct about XML layout files?

Answer options

Correct answer: C

Explanation

Option C is correct because, in an Eclipse project with the ADT plugin, XML layout files are indeed located in the /res/layout directory. Option A is incorrect as setContentView requires a resource ID, not a string. Option B is misleading since there are differences between defining layouts in code and XML. Option D is also inaccurate because the layout is not converted into code but rather interpreted at runtime.