0
如何使用Universal Image Loader从URL加载图像? 我的HashMap:如何在SimpleAdapter中使用URL图像?
ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>();
HashMap<String, String> map = new HashMap<String, String>();
map.put("pict", "http://server/image");
map.put("name", "Name of the picture");
mylist.add(map);
然后,我有SimpleAdapter:
ListView list = (ListView) findViewById(R.id.prod_listview);
SimpleAdapter mSchedule = new SimpleAdapter(prod.this, mylist, R.layout.prod_rows, new String[] {"pict", "name"}, new int[] {R.id.prod_pict, R.id.prod_name});
list.setAdapter(mSchedule);
我客串,我应该下载 'http://server/image',使其位图和一些神奇的方式把它放到SimpleAdapter。但是如何? 我看到通用图像加载程序,但我不知道如何在我的情况下使用它。
异步设置图像这个例子并不是一个例子使用SimpleAdapter :( –