Commit a59db2b6 authored by gaodapeng's avatar gaodapeng

修改了回收的逻辑,避免了崩溃

parent 4555129f
...@@ -355,7 +355,8 @@ public class ImageVideoFragment extends Fragment { ...@@ -355,7 +355,8 @@ public class ImageVideoFragment extends Fragment {
@Override @Override
public void onDestroyView() { public void onDestroyView() {
if (ivWaitLoading != null) { //2021/2/24 记录:这里要判断LoadingImage的存在,否则会回收本地Resource,造成加载错误.本地id标识的图片也会处理为BitmapDrawable
if (bannerBean.getLoadingImage() != null && ivWaitLoading != null) {
Drawable drawable = ivWaitLoading.getDrawable(); Drawable drawable = ivWaitLoading.getDrawable();
ivWaitLoading.setImageDrawable(null); ivWaitLoading.setImageDrawable(null);
if (drawable instanceof BitmapDrawable) { if (drawable instanceof BitmapDrawable) {
......
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