I have a very simple ListView right now in a ListActivity that displays just a list of text values. Here's my current code:
public class InfoActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
List<String> values = new ArrayList<String>();
// loads up the values array here
// ...
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, values);
setListAdapter(adapter);
}
My XML file for InfoActivity has nothing in it because I am using a ListActivity.
What I want to do it make custom layouts for the rows. The first 5 rows will have layoutA.xml and the second 5 rows will have layoutB.xml.
How do I do this? I'm lost on where to begin. Obviously I'm looking for the simplest code possible.