I'm new to Java and Android development and i'm stucked while trying to populate an ArrayAdapter to creating a ListView. The code below works perfectly:
String name[] = {"a","b","c",
"d","e"};
this.setListAdapter(new ArrayAdapter<String>(this,
R.layout.row, R.id.label,
name));
But I simply can't figure out how I should populate name with a for loop. All suggestions are welcome.
for (int i = 0; i < xmlhandler.getName().size(); i++) { }works fine, but I can't assign the values to name[].name[i]in that loop.