/** * @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; }
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; }
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."); } }