示例#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();
   }
 }
示例#2
0
文件: ShopApp.java 项目: gerik84/pohs
  @Override
  public void onCreate() {
    super.onCreate();

    Tools.initialize(getApplicationContext());
    JsonCacheDbHelper.setDbVersion(BuildConfig.VERSION_CODE);
    JsonCacheDbHelper.setListener(
        new JsonCacheDbHelper.Listener() {
          @Override
          public void onException(Throwable e, String addon) {
            log(e);
            //                Tools.gaTrackerPostException(e, addon);
          }
        });
  }
示例#3
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);
    }
  }