From 3b33359628bf7170dd006e56be9e0d65823c466d Mon Sep 17 00:00:00 2001 From: FongMi Date: Fri, 6 Sep 2024 11:30:35 +0800 Subject: [PATCH] Fix subtitle action focus --- app/src/leanback/res/drawable/ic_subtitle_down.xml | 2 +- app/src/leanback/res/drawable/ic_subtitle_large.xml | 2 +- app/src/leanback/res/drawable/ic_subtitle_reset.xml | 2 +- app/src/leanback/res/drawable/ic_subtitle_small.xml | 2 +- app/src/leanback/res/drawable/ic_subtitle_up.xml | 2 +- app/src/leanback/res/drawable/selector_subtitle.xml | 4 ++++ app/src/leanback/res/drawable/shape_subtitle.xml | 9 --------- .../leanback/res/drawable/shape_subtitle_focused.xml | 9 +++++++++ app/src/leanback/res/layout/dialog_subtitle.xml | 10 +++++----- 9 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 app/src/leanback/res/drawable/selector_subtitle.xml delete mode 100644 app/src/leanback/res/drawable/shape_subtitle.xml create mode 100644 app/src/leanback/res/drawable/shape_subtitle_focused.xml diff --git a/app/src/leanback/res/drawable/ic_subtitle_down.xml b/app/src/leanback/res/drawable/ic_subtitle_down.xml index 7c0ab5c86..9652643d2 100644 --- a/app/src/leanback/res/drawable/ic_subtitle_down.xml +++ b/app/src/leanback/res/drawable/ic_subtitle_down.xml @@ -1,7 +1,7 @@ + + + \ No newline at end of file diff --git a/app/src/leanback/res/drawable/shape_subtitle.xml b/app/src/leanback/res/drawable/shape_subtitle.xml deleted file mode 100644 index 7c7a231aa..000000000 --- a/app/src/leanback/res/drawable/shape_subtitle.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/leanback/res/drawable/shape_subtitle_focused.xml b/app/src/leanback/res/drawable/shape_subtitle_focused.xml new file mode 100644 index 000000000..829b75d96 --- /dev/null +++ b/app/src/leanback/res/drawable/shape_subtitle_focused.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/app/src/leanback/res/layout/dialog_subtitle.xml b/app/src/leanback/res/layout/dialog_subtitle.xml index d5d89f9b1..aa2b42c7c 100644 --- a/app/src/leanback/res/layout/dialog_subtitle.xml +++ b/app/src/leanback/res/layout/dialog_subtitle.xml @@ -9,7 +9,7 @@ android:id="@+id/large" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackgroundBorderless" + android:background="@drawable/selector_subtitle" android:focusable="true" android:padding="8dp" android:src="@drawable/ic_subtitle_large" /> @@ -18,7 +18,7 @@ android:id="@+id/small" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackgroundBorderless" + android:background="@drawable/selector_subtitle" android:focusable="true" android:padding="8dp" android:src="@drawable/ic_subtitle_small" /> @@ -27,7 +27,7 @@ android:id="@+id/up" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackgroundBorderless" + android:background="@drawable/selector_subtitle" android:focusable="true" android:padding="8dp" android:src="@drawable/ic_subtitle_up" /> @@ -36,7 +36,7 @@ android:id="@+id/down" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackgroundBorderless" + android:background="@drawable/selector_subtitle" android:focusable="true" android:padding="8dp" android:src="@drawable/ic_subtitle_down" /> @@ -45,7 +45,7 @@ android:id="@+id/reset" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackgroundBorderless" + android:background="@drawable/selector_subtitle" android:focusable="true" android:padding="8dp" android:src="@drawable/ic_subtitle_reset" />