public static void releaseImageViewResouce(ImageView imageView) {
if (imageView == null) return;
Drawable drawable = imageView.getDrawable();
if (drawable != null && drawable instanceof BitmapDrawable) {
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
Bitmap bitmap = bitmapDrawable.getBitmap();
if (bitmap != null && !bitmap.isRecycled()) {
bitmap.recycle();
}
}
}
手动回收ImageVIew的图片资源
猜你喜欢
转载自blog.csdn.net/yw1688/article/details/54584847
今日推荐
周排行