protected Void doInBackground(Void... arg0) {
//Here i have put all my data,
//taken from json file, in a hashmap, names,
//numbers, and urls that represent a photos.
}
然后我将这个hashMap放在eventList中:
ArrayList<HashMap<String, String>> eventList;
和onPostExecute在这里:
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
// Dismiss the progress dialog
if (pDialog.isShowing())
pDialog.dismiss();
ListAdapter adapter = new SimpleAdapter( Home.this,
eventList, R.layout.list_events_linear,
new String[]{"name", "number"},
new int[]{R.id.name, R.id.number}
);
lv.setAdapter(adapter);
}
可以很好地看到姓名和号码,但是如何放置图片呢? 请帮助我。