mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 21:07:11 +01:00
Change some zoom scalings in activitys and fragments for image viewing.
This commit is contained in:
parent
994df9062c
commit
c21d59e979
@ -52,22 +52,22 @@ import javax.inject.Named;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.BuildConfig;
|
||||
import ml.docilealligator.infinityforreddit.Infinity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SetAsWallpaperCallback;
|
||||
import ml.docilealligator.infinityforreddit.WallpaperSetter;
|
||||
import ml.docilealligator.infinityforreddit.asynctasks.SaveBitmapImageToFileAsyncTask;
|
||||
import ml.docilealligator.infinityforreddit.asynctasks.SaveGIFToFileAsyncTask;
|
||||
import ml.docilealligator.infinityforreddit.bottomsheetfragments.SetAsWallpaperBottomSheetFragment;
|
||||
import ml.docilealligator.infinityforreddit.BuildConfig;
|
||||
import ml.docilealligator.infinityforreddit.font.ContentFontFamily;
|
||||
import ml.docilealligator.infinityforreddit.font.ContentFontStyle;
|
||||
import ml.docilealligator.infinityforreddit.font.FontFamily;
|
||||
import ml.docilealligator.infinityforreddit.font.FontStyle;
|
||||
import ml.docilealligator.infinityforreddit.font.TitleFontFamily;
|
||||
import ml.docilealligator.infinityforreddit.font.TitleFontStyle;
|
||||
import ml.docilealligator.infinityforreddit.Infinity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.services.DownloadMediaService;
|
||||
import ml.docilealligator.infinityforreddit.SetAsWallpaperCallback;
|
||||
import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils;
|
||||
import ml.docilealligator.infinityforreddit.WallpaperSetter;
|
||||
|
||||
public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWallpaperCallback {
|
||||
|
||||
@ -211,8 +211,6 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa
|
||||
final SubsamplingScaleImageView view = mImageView.getSSIV();
|
||||
|
||||
if (view != null) {
|
||||
view.setMinimumDpi(80);
|
||||
|
||||
view.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() {
|
||||
@Override
|
||||
public void onReady() {
|
||||
@ -221,7 +219,8 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa
|
||||
|
||||
@Override
|
||||
public void onImageLoaded() {
|
||||
view.setDoubleTapZoomDpi(70);
|
||||
view.setMinimumDpi(80);
|
||||
view.setDoubleTapZoomDpi(240);
|
||||
view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED);
|
||||
view.setQuickScaleEnabled(true);
|
||||
}
|
||||
|
@ -102,6 +102,8 @@ public class ViewImgurImageFragment extends Fragment {
|
||||
isActionBarHidden = true;
|
||||
}
|
||||
});
|
||||
imageView.setMinimumDpi(80);
|
||||
imageView.setDoubleTapZoomDpi(240);
|
||||
|
||||
errorLinearLayout.setOnClickListener(view -> {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
|
@ -45,15 +45,15 @@ import java.io.File;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.BuildConfig;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SetAsWallpaperCallback;
|
||||
import ml.docilealligator.infinityforreddit.activities.ViewRedditGalleryActivity;
|
||||
import ml.docilealligator.infinityforreddit.asynctasks.SaveBitmapImageToFileAsyncTask;
|
||||
import ml.docilealligator.infinityforreddit.asynctasks.SaveGIFToFileAsyncTask;
|
||||
import ml.docilealligator.infinityforreddit.bottomsheetfragments.SetAsWallpaperBottomSheetFragment;
|
||||
import ml.docilealligator.infinityforreddit.BuildConfig;
|
||||
import ml.docilealligator.infinityforreddit.post.Post;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.services.DownloadMediaService;
|
||||
import ml.docilealligator.infinityforreddit.SetAsWallpaperCallback;
|
||||
|
||||
public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
|
||||
@ -129,8 +129,6 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
final SubsamplingScaleImageView view = imageView.getSSIV();
|
||||
|
||||
if (view != null) {
|
||||
view.setMinimumDpi(80);
|
||||
|
||||
view.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() {
|
||||
@Override
|
||||
public void onReady() {
|
||||
@ -139,7 +137,8 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public void onImageLoaded() {
|
||||
view.setDoubleTapZoomDpi(70);
|
||||
view.setMinimumDpi(80);
|
||||
view.setDoubleTapZoomDpi(240);
|
||||
view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED);
|
||||
view.setQuickScaleEnabled(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user