From a526015668a976bbddcd01e9f39d45cff317a88a Mon Sep 17 00:00:00 2001 From: Muhammad Khubaib Imtiaz <98816544+KhubaibKhan4@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:21:53 +0500 Subject: [PATCH] fix: mini player overlaps navigation bar (#5694) --- .../java/com/github/libretube/ui/activities/MainActivity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt index 62ceb82c9..dd5cb68ee 100644 --- a/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt @@ -12,6 +12,7 @@ import android.widget.ScrollView import androidx.activity.addCallback import androidx.activity.viewModels import androidx.appcompat.widget.SearchView +import androidx.constraintlayout.widget.ConstraintSet import androidx.core.content.pm.ShortcutManagerCompat import androidx.core.os.bundleOf import androidx.core.view.allViews @@ -168,7 +169,7 @@ class MainActivity : BaseActivity() { R.id.searchResultFragment -> { navController.popBackStack(R.id.searchFragment, true) || - navController.popBackStack() + navController.popBackStack() } else -> { @@ -455,7 +456,8 @@ class MainActivity : BaseActivity() { linLayout.isVisible = true playerMotionLayout.setTransitionDuration(250) playerMotionLayout.transitionToEnd() - playerMotionLayout.getConstraintSet(R.id.start).constrainHeight(R.id.player, 0) + playerMotionLayout.getConstraintSet(R.id.start) + .constrainHeight(R.id.player, ConstraintSet.WRAP_CONTENT) playerMotionLayout.enableTransition(R.id.yt_transition, true) } (fragment as? AudioPlayerFragment)?.binding?.apply {