Android Application Development (AND-401) — Question 55
Which is the correct explanation of ListView?
Answer options
- A. It is necessary to use ListView as a set with ListActivity.
- B. You cannot use a ListView when there is no information to be displayed.
- C. When displaying a list of Strings using an ArrayAdapter class in ListView, you must save the value in an ArrayList.
- D. ListView has a function to display a list of uniquely defined Views other than TextView.
Correct answer: D
Explanation
Option D is correct because ListView can display various types of Views, not just TextViews, allowing for greater flexibility in UI design. Option A is incorrect as ListView can function independently without being paired with ListActivity. Option B is false since a ListView can be empty and still function. Option C is misleading because while using an ArrayList is common, it is not a strict requirement as other data structures can also be used.