From a3ddcb874d9be151c30928b9b371ef4439eb59e9 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 4 Dec 2022 07:41:25 +1100 Subject: Fix bottom app bar not shown in ViewRedditGalleryImageOrGifFragment. --- .../fragments/ViewRedditGalleryImageOrGifFragment.java | 8 ++++---- .../main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'app') 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 839b47ec..39090be1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java @@ -228,8 +228,8 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { if (activity.isUseBottomAppBar()) { bottomAppBarMenu.setVisibility(View.VISIBLE); } - if (captionTextOrUrlIsNotEmpty){ - bottomAppBar.setVisibility(View.VISIBLE); + if (captionTextOrUrlIsNotEmpty) { + captionLayout.setVisibility(View.VISIBLE); } } else { hideAppBar(); @@ -317,7 +317,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { captionUrlTextView.setHighlightColor(Color.TRANSPARENT); } } else { - bottomAppBar.setVisibility(View.GONE); + captionLayout.setVisibility(View.GONE); } return rootView; @@ -335,7 +335,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { if (activity.isUseBottomAppBar()) { bottomAppBarMenu.setVisibility(View.GONE); } - bottomAppBar.setVisibility(View.GONE); + captionLayout.setVisibility(View.GONE); } private void loadImage() { diff --git a/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml b/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml index 71e04ebf..70dec26a 100644 --- a/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml +++ b/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml @@ -45,6 +45,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" + android:minHeight="0dp" app:paddingBottomSystemWindowInsets="false" android:backgroundTint="#80000000"> -- cgit v1.2.3