Hello everyone. First, im new to developing for android and this forum. my question is this: i was looking at the "Hello world view: gridview" example and was wondering, how do i load all my images dynamically. for example in the ImageAdapter.java
file, at the end there is:
private Integer[] mThumbIds = {
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7
};
but what if i dont know the images name (as the user will add new images). what i would like to do is grab the image name from an xml file and then load it into an array. how do i accomplish this?