diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 5457369e5..6d2b9ca37 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -149,8 +149,7 @@ public class SearchFragment extends BaseListFragment()); @@ -1007,17 +1005,17 @@ public class SearchFragment extends BaseListFragment { - correctSuggestionPanel.setVisibility(View.GONE); + correctSuggestion.setOnClickListener(v -> { + correctSuggestion.setVisibility(View.GONE); search(searchSuggestion, contentFilter, sortFilter); searchEditText.setText(searchSuggestion); }); - correctSuggestionPanel.setVisibility(View.VISIBLE); + correctSuggestion.setVisibility(View.VISIBLE); } else { - correctSuggestionPanel.setVisibility(View.GONE); + correctSuggestion.setVisibility(View.GONE); } } diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml index ca6a2eaf8..9412e8c43 100644 --- a/app/src/main/res/layout/fragment_search.xml +++ b/app/src/main/res/layout/fragment_search.xml @@ -6,31 +6,22 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - + android:background="?attr/selectableItemBackground" + android:padding="10dp" + android:textColor="@color/background_title_color" + android:textSize="@dimen/search_suggestion_text_size" + tools:text="Showing results for lorem ipsum dolor sit amet consectetur adipisci elit" />