Android Application Development (AND-401) — Question 85
To create a customized Adapter for a compound list item layout, you should:
Answer options
- A. Extend class android.widget.Adapter or any of its descendants then override method getView()
- B. Extend class android.widget.ListView or any of its descendants, then override method getView()
- C. Extend class android.widget.AbsAdapter or any of its descendants, then override method getView()
- D. Extend class android.widget.Adapter or any of its descendants, then override method getAdapterView().
Correct answer: A
Explanation
The correct answer is A, as you need to extend the Adapter class and override the getView() method to provide a custom view for each item in the list. Options B and C are incorrect because ListView and AbsAdapter are not meant for creating custom adapters directly. Option D is also incorrect since getAdapterView() is not the appropriate method to override for customizing item views.