pip fixes

This commit is contained in:
reduplicated 2023-04-11 18:04:24 +02:00
parent 4449347593
commit bdb45b69d3
3 changed files with 968 additions and 952 deletions

View file

@ -184,7 +184,7 @@ abstract class AbstractPlayerFragment(
isInPIPMode = isInPictureInPictureMode
if (isInPictureInPictureMode) {
// Hide the full-screen UI (controls, etc.) while in picture-in-picture mode.
player_holder?.alpha = 0f
piphide?.isVisible = false
pipReceiver = object : BroadcastReceiver() {
override fun onReceive(
context: Context,
@ -212,7 +212,7 @@ abstract class AbstractPlayerFragment(
updateIsPlaying(Pair(isPlayingValue, isPlayingValue))
} else {
// Restore the full-screen UI.
player_holder?.alpha = 1f
piphide?.isVisible = true
exitedPipMode()
pipReceiver?.let {
activity?.unregisterReceiver(it)

View file

@ -8,17 +8,6 @@
android:screenOrientation="landscape"
tools:orientation="vertical">
<FrameLayout
android:id="@+id/subtitle_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/shadow_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_overlay" />
</FrameLayout>
<!--
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -53,6 +42,17 @@
</LinearLayout>
-->
<FrameLayout
android:id="@+id/piphide"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/shadow_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_overlay" />
<RelativeLayout
android:id="@+id/player_time_menu"
android:layout_width="match_parent"
@ -97,13 +97,13 @@
android:layout_height="match_parent">
<LinearLayout
android:clipToPadding="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="80dp"
android:paddingTop="20dp"
android:layout_marginEnd="80dp"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingTop="20dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -695,4 +695,13 @@
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
-->
</FrameLayout>
<FrameLayout
android:id="@+id/subtitle_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
</FrameLayout>

View file

@ -9,8 +9,9 @@
android:tag="television"
tools:orientation="vertical">
<FrameLayout
android:id="@+id/subtitle_holder"
android:id="@+id/piphide"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -19,7 +20,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/player_gradient_tv" />
</FrameLayout>
<!--
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -373,5 +373,12 @@
</HorizontalScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
<FrameLayout
android:id="@+id/subtitle_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
</FrameLayout>