-
Notifications
You must be signed in to change notification settings - Fork 724
Add search suggestions to search UI #2294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Implemented search suggestions using Google's autocomplete API. Added SearchSuggestionAdapter, SearchSuggestionApi, and related UI components to display and interact with suggestions in both mobile and TV search fragments. Suggestions are fetched with debounce and can be selected to search or fill the search box.
Changed root layout from LinearLayout to FrameLayout in both search and search_tv fragments. Moved search suggestions RecyclerView to overlay above content for better UI layering and increased elevation for improved visibility.
fire-light42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool pull request!
I only have minor code and UI+UX considerations.
app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchSuggestionApi.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt
Show resolved
Hide resolved
Introduces a new setting to enable or disable search suggestions while typing. Updates UI logic to respect this setting, improves suggestion parsing, and adjusts search suggestion recycler margin for better layout.
|
Resolved. |
Updated the text size of search suggestions from 16sp to 18sp for improved readability in the UI.
fire-light42
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is virtually unusable on TV due to the focus loss. I am unsure if we only want the focus loss on phone layout or if we disable this feature on TV.
Introduces a clear suggestions button to the search suggestions overlay, visible on TV layouts. Refactors the suggestions overlay into a FrameLayout to support the button, updates focus handling for TV, and adds a new string resource for the button label.
Removed focus loss for tv layout, alternatively added a clear suggestion button for tv layout to hide the suggestions and even enter or ok button also hides the suggestions in all layouts |
same done for emulator layout |

Implemented search suggestions using Google's autocomplete API. Added SearchSuggestionAdapter, SearchSuggestionApi, and related UI components to display and interact with suggestions in both mobile and TV search fragments. Suggestions are fetched with debounce and can be selected to search or fill the search box.