#3520 Searchable Settings (#3683)

* Adding class stubs for settings search, UI elements.

* -  implement searchable settings
- `SettingsController.setupPreferenceScreen` must return a PreferenceScreen

* Remove unneeded SettingsControllerFactory.

* Set query hint, clean up code smell.

* Add search button to MoreController, stop infinite recursion.

* - initialize SearchResultCollection once in Activity.onCreate

* - implement prefernce highlighting after settings search

* - Ensure all Preferences have a key set or else the highlighting effect will have no effect on it.
- remove ExtensionFilterController and SourceFilterController from settingControllersList in SettingsSearchHelper, since those are related to Extensions and not Settings

* Limiting search to settings menu only, localized breadcrumb string, and code cleanup after code review.

* - moved call to SettingsSearchHelper.initPreferenceSearchResultCollection() into SettingsSearchController

* Code review cleanup and refactoring.

* Inlined non-reused key strings.

* Adding more UI polish, add comments for future enhancements.

* - retain search query when navigating *away* from SettingsSearchController
- keep `searchItem` in `expandActionView` state until user goes back (fixes the empty view in `SettingsSearchSearchController` issue)

Co-authored-by: mpm11011 <markuscicero5@gmail.com>
Co-authored-by: lmj0011 <9396189+lmj0011@users.noreply.github.com>
This commit is contained in:
arkon
2020-09-22 22:23:38 -04:00
committed by GitHub
28 changed files with 712 additions and 19 deletions

View File

@@ -44,6 +44,7 @@
<string name="action_sort_latest_chapter">Latest chapter</string>
<string name="action_sort_date_added">Date added</string>
<string name="action_search">Search</string>
<string name="action_search_settings">Search settings</string>
<string name="action_global_search">Global search</string>
<string name="action_select_all">Select all</string>
<string name="action_select_inverse">Select inverse</string>
@@ -411,6 +412,7 @@
<string name="licenses">Open source licenses</string>
<string name="check_for_updates">Check for updates</string>
<string name="updated_version">Updated to v%1$s</string>
<string name="about_resources">Resources</string>
<!-- ACRA -->
<string name="pref_enable_acra">Send crash reports</string>