Fix overlap between extended details and video controls

This commit is contained in:
Naveen Singh 2024-09-11 22:49:26 +05:30
parent bccf0cff58
commit 24232c8205
No known key found for this signature in database
GPG key ID: AF5D43C216778C0B
2 changed files with 7 additions and 2 deletions

View file

@ -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)
}

View file

@ -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" />
<include
android:id="@+id/bottom_video_time_holder"