From 71943913754de1d9aa158b8d9420809ff7118db6 Mon Sep 17 00:00:00 2001
From: firelight <147925818+fire-light42@users.noreply.github.com>
Date: Sat, 26 Oct 2024 17:24:53 +0000
Subject: [PATCH] fixed ugly M3 style on tv
---
.../res/color/color_primary_transparent.xml | 4 +
.../main/res/layout/fragment_result_tv.xml | 227 +++++++++---------
app/src/main/res/values/styles.xml | 6 +
3 files changed, 120 insertions(+), 117 deletions(-)
create mode 100644 app/src/main/res/color/color_primary_transparent.xml
diff --git a/app/src/main/res/color/color_primary_transparent.xml b/app/src/main/res/color/color_primary_transparent.xml
new file mode 100644
index 0000000000..e6d1f8c9eb
--- /dev/null
+++ b/app/src/main/res/color/color_primary_transparent.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_result_tv.xml b/app/src/main/res/layout/fragment_result_tv.xml
index 893c19ff8c..e9d090172e 100644
--- a/app/src/main/res/layout/fragment_result_tv.xml
+++ b/app/src/main/res/layout/fragment_result_tv.xml
@@ -91,15 +91,13 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:layout_gravity="center"
android:alpha="0.8"
android:scaleType="matrix"
- tools:src="@drawable/profile_bg_dark_blue" >
-
+ tools:src="@drawable/profile_bg_dark_blue" />
-
+ android:src="@drawable/background_shadow" />
+ android:layout_marginTop="225dp"
+ android:orientation="vertical">
+ tools:text="8 Episodes"
+ tools:visibility="visible" />
-
+
+
+
+
+
-
-
-
-
-
+ android:maxLines="1"
+ android:textColor="?attr/grayTextColor"
+ tools:ignore="RtlSymmetry"
+ tools:text="69m remaining" />
+
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/ic_baseline_play_arrow_24"
+ app:iconPadding="0dp" />
+ tools:visibility="visible">
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/ic_baseline_play_arrow_24"
+ app:iconPadding="0dp" />
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/ic_baseline_resume_arrow2"
+ app:iconPadding="0dp" />
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/ic_baseline_film_roll_24"
+ app:iconPadding="0dp" />
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/outline_bookmark_add_24"
+ app:iconPadding="0dp" />
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/ic_baseline_favorite_border_24"
+ app:iconPadding="0dp" />
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/baseline_notifications_none_24"
+ app:iconPadding="0dp" />
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/search_icon"
+ app:iconPadding="0dp" />
+ tools:visibility="visible">
-
+ android:tag="@string/tv_no_focus_tag"
+ app:icon="@drawable/ic_baseline_sort_24"
+ app:iconPadding="0dp" />
+ android:baselineAligned="false"
+ android:orientation="horizontal">
@@ -570,9 +563,9 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:layout_height="wrap_content"
android:ellipsize="end"
android:fadingEdgeLength="30dp"
+ android:focusable="true"
android:foreground="@drawable/outline_drawable"
android:maxLines="7"
- android:focusable="true"
android:nextFocusUp="@id/result_play_parent"
android:nextFocusDown="@id/result_cast_items"
android:padding="5dp"
@@ -617,14 +610,14 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:textColor="?attr/textColor"
android:textSize="20sp"
android:textStyle="bold"
- tools:visibility="visible"
- android:visibility="gone" />
+ android:visibility="gone"
+ tools:visibility="visible" />
@@ -634,9 +627,9 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
+ android:descendantFocusability="afterDescendants"
android:nextFocusUp="@id/result_cast_items"
android:nextFocusDown="@id/result_recommendations_list"
- android:descendantFocusability="afterDescendants"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
@@ -1042,19 +1035,19 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
android:layout_height="wrap_content"
android:orientation="vertical">
-
+
-
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index db00667001..bfe435ef93 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -99,6 +99,12 @@
- 0dp
+
+