aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-01-07 07:59:45 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-01-07 07:59:45 +0000
commitdf18fc63ad19511efed96ff04aa35f4f2b01afce (patch)
tree3a156f69c2c606a928518155982ec98a1f686797 /app/src
parent2f912a523ee910ef75958365d89d2405cb6e5fc7 (diff)
downloadinfinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.tar
infinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.tar.gz
infinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.tar.bz2
infinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.tar.lz
infinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.tar.xz
infinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.tar.zst
infinity-for-reddit-df18fc63ad19511efed96ff04aa35f4f2b01afce.zip
Fix some images not showing in center.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java1
3 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java
index 63fc42a9..1a5a8c38 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java
@@ -223,6 +223,7 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa
view.setDoubleTapZoomDpi(240);
view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED);
view.setQuickScaleEnabled(true);
+ view.resetScaleAndCenter();
}
@Override
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 51bfeb6c..df4c01cb 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewImgurImageFragment.java
@@ -104,6 +104,7 @@ public class ViewImgurImageFragment extends Fragment {
});
imageView.setMinimumDpi(80);
imageView.setDoubleTapZoomDpi(240);
+ imageView.resetScaleAndCenter();
errorLinearLayout.setOnClickListener(view -> {
progressBar.setVisibility(View.VISIBLE);
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 b93068c5..7373279e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java
@@ -141,6 +141,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
view.setDoubleTapZoomDpi(240);
view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED);
view.setQuickScaleEnabled(true);
+ view.resetScaleAndCenter();
}
@Override