From d21752e7928ec1af07accb9eb6bab92b5a5cdd6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20Civano=C4=9Flu?= Date: Thu, 19 Feb 2026 10:17:51 +0300 Subject: [PATCH 1/2] fix(player): keep TV landscape lock and show rotate button Ensure the rotate control remains visible on TV/emulator layouts by relying only on `playerRotateEnabled`, instead of forcibly hiding it. --- .../ui/player/FullScreenPlayer.kt | 6 +- .../res/layout/player_custom_layout_tv.xml | 2008 ++++++++--------- 2 files changed, 994 insertions(+), 1020 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt index 2ba4c691ca..b5c1109f3e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt @@ -2385,8 +2385,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { playerBinding?.apply { playerSpeedBtt.isVisible = playBackSpeedEnabled playerResizeBtt.isVisible = playerResizeEnabled - playerRotateBtt.isVisible = - if (isLayout(TV or EMULATOR)) false else playerRotateEnabled + playerRotateBtt.isVisible = playerRotateEnabled if (hideControlsNames) { hideControlsNames() } @@ -2602,6 +2601,9 @@ open class FullScreenPlayer : AbstractPlayerFragment() { } private fun dynamicOrientation(): Int { + if (isLayout(TV or EMULATOR)) { + return ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE + } return if (autoPlayerRotateEnabled) { if (isVerticalOrientation) { ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT diff --git a/app/src/main/res/layout/player_custom_layout_tv.xml b/app/src/main/res/layout/player_custom_layout_tv.xml index 450b77c709..f886f881e7 100644 --- a/app/src/main/res/layout/player_custom_layout_tv.xml +++ b/app/src/main/res/layout/player_custom_layout_tv.xml @@ -1,33 +1,33 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + android:id="@+id/player_progressbar_left_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_marginBottom="220dp" + android:src="@drawable/ic_baseline_volume_up_24" + app:tint="@android:color/white" + tools:ignore="ContentDescription" + > + + + + + + + + + + + + + + + + + + + + + + + + - - - + android:layout_gravity="end" + tools:text="HDR10 • HEVC" + /> + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_marginTop="5dp" + android:indeterminate="false" + android:indeterminateTint="?attr/colorPrimary" + android:progressBackgroundTint="?attr/colorPrimary" + android:progressTint="?attr/colorPrimary" + tools:progress="20" + /> - - - - + + + - - - + + + + + + + + + + + - - - + + + + + + + + + - - + + + + + + + + + + + + - - - - - - - \ No newline at end of file + android:orientation="horizontal" + > + + + + + + + + + + + + + + + + + + + + + + + From 80c7cabc9ddfacb9811a272186946405861395a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20Civano=C4=9Flu?= Date: Thu, 19 Feb 2026 10:24:07 +0300 Subject: [PATCH 2/2] rollback code formatter --- .../res/layout/player_custom_layout_tv.xml | 400 ++++++++++-------- 1 file changed, 217 insertions(+), 183 deletions(-) diff --git a/app/src/main/res/layout/player_custom_layout_tv.xml b/app/src/main/res/layout/player_custom_layout_tv.xml index f886f881e7..944abf4290 100644 --- a/app/src/main/res/layout/player_custom_layout_tv.xml +++ b/app/src/main/res/layout/player_custom_layout_tv.xml @@ -1,5 +1,4 @@ - + tools:orientation="vertical"> + + android:layout_height="match_parent"> + + + + android:layout_height="match_parent"> + + android:background="@drawable/player_gradient_tv" /> + tools:ignore="ContentDescription"> + + + + style="@android:style/Widget.Material.ProgressBar.Horizontal" /> + + style="@android:style/Widget.Material.ProgressBar.Horizontal" /> + + tools:visibility="visible"> + + tools:ignore="ContentDescription"> + + + + android:progressTintMode="src_in" /> + + android:progressTintMode="src_in" /> + + + tools:visibility="visible" /> + + app:layout_constraintTop_toTopOf="parent" /> + + android:visibility="gone" /> + + android:visibility="gone" /> + + app:tint="@color/white" /> + + android:padding="16dp"> + + tools:visibility="visible" /> + + android:layout_height="match_parent"> + + android:orientation="vertical"> + + android:layout_gravity="end"> + tools:text="Hello world" /> + android:layout_gravity="start"/> + + tools:text="1920x1080" /> + + tools:text="HDR10 • HEVC" /> + + + android:layout_marginTop="2dp"> + + android:text="@string/filler" /> + + + app:layout_constraintTop_toTopOf="parent"> + + android:orientation="vertical"> + + app:tint="@android:color/white" /> + + tools:visibility="visible" /> + + + android:orientation="vertical"> + + app:tint="@android:color/white" /> + + tools:visibility="visible" /> + + + android:orientation="vertical"> + + app:tint="@android:color/white" /> + + tools:visibility="visible" /> + + + android:orientation="vertical"> + + app:tint="@android:color/white" /> + + tools:visibility="visible" /> + + android:orientation="vertical"> + + app:tint="@android:color/white" /> + + tools:visibility="visible" /> + + + app:cardCornerRadius="@dimen/rounded_image_radius"> + + android:orientation="vertical"> + + tools:text="10MB / 20MB" /> + + tools:text="10MB/s - 12 seeders" /> + + tools:progress="20" /> + + + + + tools:visibility="visible"> + + app:layout_constraintWidth_percent="0.5"> + + tools:text="10" /> + + tools:ignore="ContentDescription" /> + + app:layout_constraintWidth_percent="0.5"> + + tools:text="10" /> + + tools:ignore="ContentDescription" /> + + tools:visibility="visible" /> + + app:layout_constraintEnd_toEndOf="parent"> + + tools:ignore="ContentDescription" /> + + + tools:ignore="ContentDescription" /> + + + tools:ignore="ContentDescription" /> + + tools:ignore="ContentDescription" /> + + tools:ignore="ContentDescription" /> + + tools:ignore="ContentDescription" /> + + app:layout_constraintStart_toStartOf="parent"> + + android:orientation="horizontal"> + + tools:ignore="ContentDescription" /> + + tools:text="15:30" /> + + tools:visibility="visible"> + + android:scaleType="centerCrop" /> + + app:unplayed_color="@color/videoProgress" /> + + tools:text="23:20" /> + + tools:text="-23:20" /> + + + android:layout_gravity="center"> + + android:orientation="horizontal"> + + android:visibility="gone"> + + app:icon="@drawable/video_locked" /> + + app:icon="@drawable/ic_baseline_fast_forward_24" /> + + tools:visibility="visible" /> + + app:icon="@drawable/ic_baseline_aspect_ratio_24" /> + + tools:text="Speed" /> + + tools:visibility="visible" /> + + app:icon="@drawable/ic_baseline_playlist_play_24" /> + + app:icon="@drawable/ic_baseline_equalizer_24" /> + + android:layout_height="match_parent"> + + + tools:visibility="visible" /> + + + android:layout_height="match_parent"> + + android:layout_height="wrap_content"/> + + android:descendantFocusability="afterDescendants"> + + - + + \ No newline at end of file