From 24232c82054e1ccd36ae4a28a502650d123d51e9 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Wed, 11 Sep 2024 22:49:26 +0530 Subject: [PATCH] Fix overlap between extended details and video controls --- .../kotlin/org/fossify/gallery/fragments/VideoFragment.kt | 6 +++++- app/src/main/res/layout/pager_video_item.xml | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt index d224f9f80..797acbdd2 100644 --- a/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/org/fossify/gallery/fragments/VideoFragment.kt @@ -15,6 +15,7 @@ import android.widget.RelativeLayout import android.widget.SeekBar import android.widget.TextView import androidx.appcompat.content.res.AppCompatResources +import androidx.core.view.children import androidx.media3.common.* import androidx.media3.common.util.UnstableApi import androidx.media3.datasource.ContentDataSource @@ -597,7 +598,10 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S val fullscreenOffset = smallMargin + if (mIsFullscreen) 0 else requireContext().navigationBarHeight var actionsHeight = 0f if (!mIsFullscreen) { - actionsHeight += resources.getDimension(R.dimen.video_player_play_pause_size) + if (binding.bottomVideoTimeHolder.root.children.any { isVisible }) { + actionsHeight += binding.bottomVideoTimeHolder.root.height + } + if (mConfig.bottomActions) { actionsHeight += resources.getDimension(R.dimen.bottom_actions_height) } diff --git a/app/src/main/res/layout/pager_video_item.xml b/app/src/main/res/layout/pager_video_item.xml index 31b9a503c..0868488d1 100644 --- a/app/src/main/res/layout/pager_video_item.xml +++ b/app/src/main/res/layout/pager_video_item.xml @@ -67,7 +67,8 @@ android:textColor="@color/theme_dark_text_color" android:textSize="@dimen/smaller_text_size" android:visibility="gone" - tools:text="My video\nAnother line" /> + tools:text="Big buck bunny.mp4\n948.52 MB\n1920 x 1080 (2.1MP)\n10 April 2008, 08:30 AM" + tools:visibility="visible" />