From fc8c0e809d9c1413293b85c694daf135e2a1fe40 Mon Sep 17 00:00:00 2001 From: KingLucius Date: Thu, 12 Oct 2023 20:56:54 +0300 Subject: [PATCH] Focus fixes for old devices (#686) - Fix Library on TV main buttons focus. - Quick search back button focus. --- app/src/main/res/layout/fragment_library_tv.xml | 3 +++ app/src/main/res/layout/quick_search.xml | 17 +++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/fragment_library_tv.xml b/app/src/main/res/layout/fragment_library_tv.xml index 8d2da9f2..ec6565ee 100644 --- a/app/src/main/res/layout/fragment_library_tv.xml +++ b/app/src/main/res/layout/fragment_library_tv.xml @@ -38,6 +38,7 @@ android:padding="2dp" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/change_providers_img_des" + android:focusable="true" android:nextFocusLeft="@id/nav_rail_view" android:nextFocusRight="@id/library_sort" android:tag="@string/tv_no_focus_tag" @@ -52,6 +53,7 @@ android:layout_marginStart="10dp" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/change_providers_img_des" + android:focusable="true" android:nextFocusLeft="@id/provider_selector" android:nextFocusRight="@id/list_selector" android:tag="@string/tv_no_focus_tag" @@ -67,6 +69,7 @@ android:layout_marginStart="10dp" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/change_providers_img_des" + android:focusable="true" android:nextFocusLeft="@id/library_sort" android:nextFocusRight="@id/main_search" android:tag="@string/tv_no_focus_tag" diff --git a/app/src/main/res/layout/quick_search.xml b/app/src/main/res/layout/quick_search.xml index eeec4a5c..f34591b0 100644 --- a/app/src/main/res/layout/quick_search.xml +++ b/app/src/main/res/layout/quick_search.xml @@ -17,14 +17,15 @@ android:layout_height="wrap_content"> + android:id="@+id/quick_search_back" + android:layout_gravity="center" + android:foregroundGravity="center" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:src="@drawable/ic_baseline_arrow_back_24" + app:tint="@android:color/white" + android:focusable="true" + android:layout_width="25dp" + android:layout_height="wrap_content">