简体   繁体   中英

How to load an ImageView by URL(json output) in Android?

url to display the image. I already displayed the 'text' contents using the following code

protected void onPostExecute(final Boolean success) {
 if (dialog.isShowing()) {
dialog.dismiss();
 }
 ListAdapter adapter = new SimpleAdapter(context, jsonlist,
 R.layout.list_item, new String[] { ID, TITLE,
  LOGO}, new int[] {
  R.id.flyer_id, R.id.title, R.id.logo
   });
 setListAdapter(adapter);
lv = getListView();   
  }

Try loading images using lazy loading concept.There is a good example mentioned in github. Try this link https://github.com/thest1/LazyList

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM