From c87b724a242f327186435fe36f67055985e48a0d Mon Sep 17 00:00:00 2001 From: Docile-Alligator Date: Thu, 24 Mar 2022 14:00:44 +0800 Subject: [PATCH] Fix captions and urls hidden by the navigation bar in ViewRedditGalleryImageorGifFragment. --- .../activities/ViewRedditGalleryActivity.java | 6 ------ .../fragments/ViewRedditGalleryImageOrGifFragment.java | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) 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 7731679f..67744239 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java @@ -16,7 +16,6 @@ import android.os.Handler; import android.text.Html; import android.view.Menu; import android.view.MenuItem; -import android.view.View; import android.widget.Toast; import androidx.annotation.NonNull; @@ -138,11 +137,6 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA ButterKnife.bind(this); - getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE - | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); - useBottomAppBar = sharedPreferences.getBoolean(SharedPreferencesUtils.USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER, false); if (!useBottomAppBar) { 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 30e6b913..e90c277f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java @@ -215,6 +215,10 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { }); loadImage(); + activity.getWindow().getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); imageView.setOnClickListener(view -> { if (isActionBarHidden) {