Which of the following is true about object arrayAdapter declared in the code below?
String[] items = {"Item 1","Item 2","Item 3"};
ArrayAdapter
Which of the following is true about object arrayAdapter declared in the code below?
String[] items = {"Item 1","Item 2","Item 3"};
ArrayAdapter
ArrayAdapter is used to adapt an array of data (in this case, strings) into views that can be displayed in a ListView. Specifically, ArrayAdapter uses a specified layout (here, android.R.layout.simple_list_item_1) to create a view for each item in the array. The layout android.R.layout.simple_list_item_1 contains a TextView, so the ArrayAdapter will create a TextView for each String in the array items.
A. It creates a TextView for each String in array items.