Example #1
0
 private void async(List<String> listImage) {
   m_urls = listImage;
   for (int i = 0; i < listImage.size(); i++) {
     ImageView image = new ImageView(Tools.getApplicationContext());
     final AQuery aq = new AQuery(image);
     AQueryHelper qh =
         new AQueryHelper(aq, image, listImage.get(i)).failDrawable(R.drawable.placeholder_big);
     qh.loadImage();
   }
 }
Example #2
0
  private void syncWithAssets(List<String> listImage) {

    for (int i = 0; i < listImage.size(); i++) {
      ImageView image = new ImageView(Tools.getApplicationContext());
      InputStream ims = null;
      try {
        ims = getResources().getAssets().open(listImage.get(i));
      } catch (IOException e) {
        e.printStackTrace();
      }
      // load image as Drawable
      Drawable d = Drawable.createFromStream(ims, null);
      // set image to ImageView
      image.setImageDrawable(d);
    }
  }