From cd8c5966e660aab714b8408551455f6af87feb86 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Mon, 16 Jan 2023 23:49:59 +0100 Subject: [PATCH] Made player_view unfocusable to prevent white overlay on Chromebooks --- app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt | 3 ++- app/src/main/res/layout/fragment_player.xml | 1 + app/src/main/res/layout/fragment_player_tv.xml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt b/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt index 0b0b787a..a5f3ff48 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt @@ -948,8 +948,9 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener { // Used to check current focus for TV // main { // while (true) { -// delay(1000) +// delay(5000) // println("Current focus: $currentFocus") +// showToast(this, currentFocus.toString(), Toast.LENGTH_LONG) // } // } diff --git a/app/src/main/res/layout/fragment_player.xml b/app/src/main/res/layout/fragment_player.xml index 412f7b5b..250551cb 100644 --- a/app/src/main/res/layout/fragment_player.xml +++ b/app/src/main/res/layout/fragment_player.xml @@ -18,6 +18,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/black" + android:focusable="false" app:auto_show="true" app:backgroundTint="@android:color/black" app:controller_layout_id="@layout/player_custom_layout" diff --git a/app/src/main/res/layout/fragment_player_tv.xml b/app/src/main/res/layout/fragment_player_tv.xml index fec649a8..a0826087 100644 --- a/app/src/main/res/layout/fragment_player_tv.xml +++ b/app/src/main/res/layout/fragment_player_tv.xml @@ -17,10 +17,10 @@ android:id="@+id/player_view" android:layout_width="match_parent" android:layout_height="match_parent" + android:focusable="false" app:auto_show="true" app:controller_layout_id="@layout/player_custom_layout_tv" app:hide_on_touch="false" - app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"