Commit 907a99ee authored by gaodapeng's avatar gaodapeng

同步主分支改动到androidx分支

parent 90f4d8a6
......@@ -359,12 +359,15 @@ public class ImageVideoFragment extends Fragment {
@Override
public void onDestroyView() {
Drawable drawable = ivWaitLoading.getDrawable();
ivWaitLoading.setImageDrawable(null);
if (drawable instanceof BitmapDrawable) {
Bitmap bm = ((BitmapDrawable) drawable).getBitmap();
if (!bm.isRecycled()) {
bm.recycle();
//2021/2/24 记录:这里要判断LoadingImage的存在,否则会回收本地Resource,造成加载错误.本地id标识的图片也会处理为BitmapDrawable
if (bannerBean.getLoadingImage() != null && ivWaitLoading != null) {
Drawable drawable = ivWaitLoading.getDrawable();
ivWaitLoading.setImageDrawable(null);
if (drawable instanceof BitmapDrawable) {
Bitmap bm = ((BitmapDrawable) drawable).getBitmap();
if (!bm.isRecycled()) {
bm.recycle();
}
}
}
super.onDestroyView();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment