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

View file

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

View file

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