From 72fb852c26e987a370aa444b9ac03a33637d8a79 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 4 Jul 2022 18:36:47 +0200 Subject: [PATCH] fix pip --- .../java/com/github/libretube/fragments/PlayerFragment.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index 7df4b3614..358f011d1 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -1207,12 +1207,14 @@ class PlayerFragment : Fragment() { if (isInPictureInPictureMode) { exoPlayerView.hideController() exoPlayerView.useController = false + binding.linLayout.visibility = View.GONE + with(binding.playerMotionLayout) { getConstraintSet(R.id.start).constrainHeight(R.id.player, -1) enableTransition(R.id.yt_transition, false) } binding.mainContainer.isClickable = true - playerBinding.exoTopBar.visibility = View.GONE + val mainActivity = activity as MainActivity mainActivity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT isFullScreen = false @@ -1221,10 +1223,10 @@ class PlayerFragment : Fragment() { getConstraintSet(R.id.start).constrainHeight(R.id.player, 0) enableTransition(R.id.yt_transition, true) } - exoPlayerView.showController() + exoPlayerView.useController = true + binding.linLayout.visibility = View.VISIBLE binding.mainContainer.isClickable = false - playerBinding.exoTopBar.visibility = View.VISIBLE } }