Clear ImageView in onDestroyView in ViewRedditGalleryImageOrGifFragment and ViewImgurImageFragment.

This commit is contained in:
Alex Ning 2021-07-19 19:55:22 +08:00
parent 7e2a8d4782
commit 3ce5664aea
4 changed files with 10 additions and 2 deletions

View File

@ -273,6 +273,7 @@ public class ViewImgurMediaActivity extends AppCompatActivity implements SetAsWa
}
});
viewPager.setAdapter(sectionsPagerAdapter);
viewPager.setOffscreenPageLimit(3);
}
private void setToolbarTitle(int position) {

View File

@ -128,6 +128,7 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA
}
});
viewPager.setAdapter(sectionsPagerAdapter);
viewPager.setOffscreenPageLimit(3);
}
private void setToolbarTitle(int position) {

View File

@ -269,4 +269,10 @@ public class ViewImgurImageFragment extends Fragment {
super.onAttach(context);
activity = (ViewImgurMediaActivity) context;
}
@Override
public void onDestroyView() {
super.onDestroyView();
glide.clear(imageView);
}
}

View File

@ -385,8 +385,8 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
}
@Override
public void onDestroy() {
super.onDestroy();
public void onDestroyView() {
super.onDestroyView();
BigImageViewer.imageLoader().cancelAll();
}
}