From 8bc3c5968664a6e54df2b568bf7543a0b7238cbe Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 21 Nov 2022 14:58:17 +0100 Subject: [PATCH] Fill Search Controller When Tapping on Arrow --- .../github/libretube/ui/adapters/SearchSuggestionsAdapter.kt | 3 +++ app/src/main/res/layout/searchsuggestion_row.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/com/github/libretube/ui/adapters/SearchSuggestionsAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/SearchSuggestionsAdapter.kt index 1abc3d2b3..d05f943e9 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/SearchSuggestionsAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/SearchSuggestionsAdapter.kt @@ -30,6 +30,9 @@ class SearchSuggestionsAdapter( root.setOnClickListener { searchView.setQuery(suggestion, true) } + arrow.setOnClickListener { + searchView.setQuery(suggestion, false) + } } } } diff --git a/app/src/main/res/layout/searchsuggestion_row.xml b/app/src/main/res/layout/searchsuggestion_row.xml index 2639eb876..589932d99 100644 --- a/app/src/main/res/layout/searchsuggestion_row.xml +++ b/app/src/main/res/layout/searchsuggestion_row.xml @@ -31,6 +31,7 @@ android:id="@+id/arrow" android:layout_width="0dp" android:layout_height="wrap_content" + android:background="?attr/selectableItemBackgroundBorderless" android:padding="5dp" android:src="@drawable/ic_arrow_up_left" app:layout_constraintEnd_toEndOf="parent"