From 16c2290090a1becb4edab44bf85a54837d6007f0 Mon Sep 17 00:00:00 2001 From: KingLucius Date: Thu, 28 Sep 2023 13:22:51 +0300 Subject: [PATCH] Amazon FireTV focus fixes (#635) * Fix quick search button focus * Switch profile button focus * Cast & Recommendations focus * Player: Profiles settings focus * Player: Subtitles encoding settings focus * profile selection: card item focus * Search history item selectable & deleteable * Search: search filter button next focus fix --- app/src/main/res/layout/cast_item.xml | 2 +- app/src/main/res/layout/fragment_home_head_tv.xml | 2 ++ app/src/main/res/layout/fragment_search_tv.xml | 2 +- app/src/main/res/layout/player_quality_profile_item.xml | 1 + app/src/main/res/layout/player_select_source_and_subs.xml | 4 ++++ app/src/main/res/layout/search_history_item.xml | 4 ++-- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/cast_item.xml b/app/src/main/res/layout/cast_item.xml index 54df59a8..c09cecfa 100644 --- a/app/src/main/res/layout/cast_item.xml +++ b/app/src/main/res/layout/cast_item.xml @@ -34,7 +34,7 @@ android:id="@+id/actor_image" android:layout_width="match_parent" - + android:focusable="true" android:layout_height="match_parent" android:contentDescription="@string/episode_poster_img_des" android:scaleType="centerCrop" diff --git a/app/src/main/res/layout/fragment_home_head_tv.xml b/app/src/main/res/layout/fragment_home_head_tv.xml index f9ea6974..05cb3a41 100644 --- a/app/src/main/res/layout/fragment_home_head_tv.xml +++ b/app/src/main/res/layout/fragment_home_head_tv.xml @@ -55,6 +55,7 @@ android:layout_gravity="end" android:background="@drawable/player_button_tv_attr_no_bg" android:contentDescription="@string/search" + android:focusable="true" android:nextFocusLeft="@id/home_preview_change_api" android:nextFocusRight="@id/home_preview_switch_account" android:nextFocusDown="@id/home_preview_info_btt" @@ -70,6 +71,7 @@ android:layout_gravity="end" android:background="@drawable/player_button_tv_attr_no_bg" android:contentDescription="@string/account" + android:focusable="true" android:nextFocusLeft="@id/home_preview_search_button" android:nextFocusRight="@id/home_preview_switch_account" android:nextFocusDown="@id/home_preview_info_btt" diff --git a/app/src/main/res/layout/fragment_search_tv.xml b/app/src/main/res/layout/fragment_search_tv.xml index 5fec8c6a..b3f88cd2 100644 --- a/app/src/main/res/layout/fragment_search_tv.xml +++ b/app/src/main/res/layout/fragment_search_tv.xml @@ -84,7 +84,7 @@ android:nextFocusLeft="@id/main_search" android:nextFocusRight="@id/main_search" android:nextFocusUp="@id/nav_rail_view" - android:nextFocusDown="@id/search_autofit_results" + android:nextFocusDown="@id/tvtypes_chips_scroll" android:src="@drawable/ic_baseline_tune_24" app:tint="?attr/textColor" /> diff --git a/app/src/main/res/layout/player_quality_profile_item.xml b/app/src/main/res/layout/player_quality_profile_item.xml index 0eab2407..5178a12f 100644 --- a/app/src/main/res/layout/player_quality_profile_item.xml +++ b/app/src/main/res/layout/player_quality_profile_item.xml @@ -10,6 +10,7 @@ android:id="@+id/card_view" android:layout_width="0dp" android:layout_height="0dp" + android:focusable="true" app:layout_constraintDimensionRatio="1" android:layout_marginStart="10dp" android:animateLayoutChanges="true" diff --git a/app/src/main/res/layout/player_select_source_and_subs.xml b/app/src/main/res/layout/player_select_source_and_subs.xml index f5eab1e7..6bf8006b 100644 --- a/app/src/main/res/layout/player_select_source_and_subs.xml +++ b/app/src/main/res/layout/player_select_source_and_subs.xml @@ -27,6 +27,7 @@ android:layout_height="wrap_content" android:layout_rowWeight="1" android:layout_marginTop="10dp" + android:focusable="true" android:foreground="@drawable/outline_drawable_forced" android:gravity="center_vertical" android:orientation="horizontal"> @@ -66,6 +67,7 @@ android:layout_rowWeight="1" android:background="?attr/primaryBlackBackground" android:listSelector="@drawable/outline_drawable_forced" + android:nextFocusUp="@id/profiles_click_settings" android:nextFocusRight="@id/sort_subtitles" android:nextFocusDown="@id/apply_btt" android:requiresFadingEdge="vertical" @@ -94,6 +96,7 @@ android:layout_height="wrap_content" android:layout_rowWeight="1" android:layout_marginTop="10dp" + android:focusable="true" android:foreground="@drawable/outline_drawable_forced" android:orientation="horizontal" android:paddingTop="10dp" @@ -139,6 +142,7 @@ android:layout_rowWeight="1" android:background="?attr/primaryBlackBackground" android:listSelector="@drawable/outline_drawable_forced" + android:nextFocusUp="@id/subtitles_click_settings" android:nextFocusLeft="@id/sort_providers" android:nextFocusRight="@id/apply_btt" android:nextFocusDown="@id/apply_btt" diff --git a/app/src/main/res/layout/search_history_item.xml b/app/src/main/res/layout/search_history_item.xml index 3e9ee833..4c50d0c0 100644 --- a/app/src/main/res/layout/search_history_item.xml +++ b/app/src/main/res/layout/search_history_item.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/outline_drawable_less" - + android:focusable="true" android:nextFocusRight="@id/home_history_remove" android:orientation="horizontal">