diff options
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
4 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java index c16cef7d..aee7b0fd 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java @@ -273,6 +273,7 @@ public class ViewImgurMediaActivity extends AppCompatActivity implements SetAsWa } }); viewPager.setAdapter(sectionsPagerAdapter); + viewPager.setOffscreenPageLimit(3); } private void setToolbarTitle(int position) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java index 267bd56b..52a02e44 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java @@ -128,6 +128,7 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA } }); viewPager.setAdapter(sectionsPagerAdapter); + viewPager.setOffscreenPageLimit(3); } private void setToolbarTitle(int position) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java index 973b0cee..d4d8c877 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java @@ -269,4 +269,10 @@ public class ViewImgurImageFragment extends Fragment { super.onAttach(context); activity = (ViewImgurMediaActivity) context; } + + @Override + public void onDestroyView() { + super.onDestroyView(); + glide.clear(imageView); + } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java index 89a99a39..476cfc8b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java @@ -385,8 +385,8 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { } @Override - public void onDestroy() { - super.onDestroy(); + public void onDestroyView() { + super.onDestroyView(); BigImageViewer.imageLoader().cancelAll(); } } |