I have a list and I would like to dynamically add rows to this list, but I want every row to be a TextView. Is this possible?
The following code doesn't work because it tells me that the method addView(TextView) is undefined for the type ArrayList (listItems):
TextView textView = new TextView(this);
textView.setText("sample text");
listItems.addView(textView);
Which is the correct way to add text views to a list then?