I Create a Activity Extends ListActivity I can used SimpleAdapter to display R.drawable.picture but I want to display picture from web in CustomerItem How do?
List
you can override following method in SimpleAdapter:
@Override
public void setViewImage(ImageView v, String value) {
super.setViewImage(v, value);
URL url;
try {
url = new URL(value);
URLConnection conn = url.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
Bitmap bm = BitmapFactory.decodeStream(is);
v.setImageBitmap(bm);
} catch (Exception e) {
e.printStackTrace();
}
}
the parameter "String value" is the url in your dataset.