コード例 #1
0
 /**
  * @param context
  * @return 作者:fighter <br>
  *     创建时间:2013-5-24<br>
  *     修改时间:<br>
  */
 public static FinalBitmap createFinalBitmap(Context context) {
   FinalBitmap finalBitmap =
       FinalBitmap.create(
           context, BitmapCommonUtils.getDiskCacheDir(context, "panlv/cache").getAbsolutePath());
   finalBitmap.configCalculateBitmapSizeWhenDecode(true);
   return finalBitmap;
 }
コード例 #2
0
 public static FinalBitmap createFinalAlbumBitmap(Context context) {
   FinalBitmap finalBitmap =
       FinalBitmap.create(
           context, BitmapCommonUtils.getDiskCacheDir(context, "panlv/cache").getAbsolutePath());
   finalBitmap.configCalculateBitmapSizeWhenDecode(true);
   finalBitmap.configBitmapMaxHeight(350);
   finalBitmap.configBitmapMaxWidth(350);
   finalBitmap.configLoadingImage(R.drawable.shakepic_noimage);
   finalBitmap.configLoadfailImage(R.drawable.shakepic_noimage);
   return finalBitmap;
 }
コード例 #3
0
 public void refreshAvatarView(String url) {
   Trace.d(TAG, "refreshAvatarView:" + rec.getAvatar().toString());
   if (!StringUtil.getInstance().IsEmpty(url)) {
     try {
       avatarFB = FinalBitmap.create(HomePageActivity.this);
       avatarFB.flushCache();
       avatarFB.closeCache();
       avatarFB.configCalculateBitmapSizeWhenDecode(true);
       avatarFB.display(ivAvatar, url, true);
     } catch (Exception e) {
       Log.e(TAG, "refreshAvatarView:display user avatar error.", e);
     }
   } else {
     Log.e(TAG, "refreshAvatarView:url is empty.");
   }
 }