Esempio n. 1
0
 private CoverHolder getHolder(ImageView coverView, FBTree tree) {
   CoverHolder holder = (CoverHolder) coverView.getTag();
   if (holder == null) {
     holder = new CoverHolder(this, coverView, tree.getUniqueKey());
     coverView.setTag(holder);
   } else {
     holder.setKey(tree.getUniqueKey());
   }
   return holder;
 }
Esempio n. 2
0
 void setCoverForView(CoverHolder holder, ZLLoadableImage image) {
   synchronized (holder) {
     try {
       final Bitmap coverBitmap = Cache.getBitmap(holder.Key);
       if (coverBitmap != null) {
         holder.CoverView.setImageBitmap(coverBitmap);
       } else if (holder.coverBitmapTask == null) {
         holder.coverBitmapTask = myPool.submit(holder.new CoverBitmapRunnable(image));
       }
     } catch (CoverCache.NullObjectException e) {
     }
   }
 }