I have 10 images and I want to put them with ListView
. If it were a activity
, it would already be done because I did it in an application, but now they are Fragment
.
String[] menuItems = { "Do some","kkk",",,,,,","Do some","kkk",",,,,,","Do some","kkk",",,,,,","Do some","kkk",",,,,,","Do some","kkk",",,,,,"};
ListView listView = (ListView) v.findViewById(R.id.mymenu);
ArrayAdapter<String> listViewAdapter = new ArrayAdapter<String> (getActivity(),android.R.layout.simple_list_item_1,menuItems);
listView.setAdapter(listViewAdapter);
return v;
Instead of String[]
would be to put something type Drawable
or similar to let me upload the photos by R.drawable.photo1
, R.drawable.photo2
. Replace the text line, but I do not know how, or how should I do it?