本文整理汇总了Java中com.nostra13.universalimageloader.utils.MemoryCacheUtils.removeFromCache方法的典型用法代码示例。如果您正苦于以下问题:Java MemoryCacheUtils.removeFromCache方法的具体用法?Java MemoryCacheUtils.removeFromCache怎么用?Java MemoryCacheUtils.removeFromCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.nostra13.universalimageloader.utils.MemoryCacheUtils
的用法示例。
在下文中一共展示了MemoryCacheUtils.removeFromCache方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cleanUp
import com.nostra13.universalimageloader.utils.MemoryCacheUtils; //导入方法依赖的package包/类
@SuppressLint("SetTextI18n")
private void cleanUp() {
progressbar.setProgress(0);
totalOriginalSize.setText("0 kb");
totalFileSize.setText("0 kb");
reductionPercent.setText("0 %");
DownloadStorageSizes.clearAll();
for (String image: imageUrls) {
MemoryCacheUtils.removeFromCache(image, imageLoader.getMemoryCache());
DiskCacheUtils.removeFromCache(image, imageLoader.getDiskCache());
}
for (ImageView imageView : imageViews) {
if (imageView != null) {
imageLoader.cancelDisplayTask(imageView);
imageView.setImageResource(android.R.color.transparent);
}
}
imageUrls.clear();
}
示例2: init
import com.nostra13.universalimageloader.utils.MemoryCacheUtils; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@AfterViews
public void init() {
if (isProtrait) {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
mProtraitRelativeLayout.setVisibility(View.VISIBLE);
} else {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
mLandscapeRelativeLayout.setVisibility(View.VISIBLE);
}
MemoryCacheUtils.removeFromCache("file://" + photoPath, ImageLoader.getInstance().getMemoryCache());
DiscCacheUtils.removeFromCache("file://" + photoPath, ImageLoader.getInstance().getDiscCache());
mImageLoader.displayImage("file://" + photoPath, imageView, ImageLoaderConfig.options);
mRelativeLayout.setOnClickListener(this);
}
示例3: onLoadingComplete
import com.nostra13.universalimageloader.utils.MemoryCacheUtils; //导入方法依赖的package包/类
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
if (view == null) return;
Object tag = view.getTag(R.id.tag_image);
if (enableDebugLog) FLog.d("tag: %s", tag);
if (tag != null && tag instanceof String) {
String actualUri = tag.toString();
File pngFile = AssistUtil.getCopiedFile(context, actualUri);
if (pngFile == null) {
if (enableDebugLog) FLog.w("Can't locate the file!!! %s", actualUri);
} else if (pngFile.exists()) {
boolean isApng = AssistUtil.isApng(pngFile);
if (isApng) {
if (enableDebugLog) FLog.d("Setup apng drawable");
ApngDrawable drawable = new ApngDrawable(context, loadedImage, Uri.fromFile(pngFile));
((ImageView) view).setImageDrawable(drawable);
} else {
((ImageView) view).setImageBitmap(loadedImage);
}
} else {
if (enableDebugLog) FLog.d("Clear cache and reload");
MemoryCacheUtils.removeFromCache(actualUri, ApngImageLoader.getInstance().getMemoryCache());
DiskCacheUtils.removeFromCache(actualUri, ApngImageLoader.getInstance().getDiskCache());
ApngImageLoader.getInstance().displayImage(actualUri, (ImageView) view, this);
}
}
if (shouldForward()) callback.onLoadFinish(true, imageUri, view);
}
示例4: removeImageCache
import com.nostra13.universalimageloader.utils.MemoryCacheUtils; //导入方法依赖的package包/类
public void removeImageCache(String s)
{
MemoryCacheUtils.removeFromCache(s, b.getMemoryCache());
DiskCacheUtils.removeFromCache(s, b.getDiscCache());
}