Searchbar: Launch on enter / done (#258)

* Search: add launch action on keyboard-done

* Add switch in settings

* :)

* fix dataStore-update, pull bestMatch from multiple sources

* launch searchAction when no other match is found

* update localization

* switch to .firstNotNullOfOrNull { }

* switch imeAction based on launchOnEnter == true

* localization

* adding highlighting for bestMatch

* Remove unused code

* Store hightlighted search result in viewmodel

* Add highlight for list item, tweak grid item highlight

* Highlight search action that is launched on enter

* localizaton

* switch to IconShape / hairline border

* remove border / outlineVariant-background

---------

Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
This commit is contained in:
Christoph
2023-02-19 18:51:31 +01:00
committed by GitHub
co-authored by MM20
parent 72b42a1105
commit b11ba9e23a
27 changed files with 298 additions and 405 deletions
+3 -1
View File
@@ -347,6 +347,8 @@
<string name="preference_search_bar_style_summary">Erscheinungsbild der Suchleiste anpassen</string>
<string name="preference_search_bar_auto_focus">Tastatur öffnen</string>
<string name="preference_search_bar_auto_focus_summary">Bildschirmtastatur beim Öffnen der Suche automatisch einblenden</string>
<string name="preference_search_bar_launch_on_enter">Eingabe zum Starten</string>
<string name="preference_search_bar_launch_on_enter_summary">Hervorgehobenes Suchergebnis oder Schnellaktion beim Berühren der Start-Taste aufrufen</string>
<string name="preference_wikipedia_customurl">Wikipedia-URL</string>
<string name="music_widget_default_title">%1$s spielt Medien</string>
<string name="music_widget_no_data">Bisher wurden keine Medien abgespielt</string>
@@ -572,4 +574,4 @@
<string name="preference_layout_fixed_rotation">Feste Bildschirmausrichtung</string>
<string name="preference_layout_fixed_rotation_summary">Porträtmodus erzwingen</string>
<string name="icon_pack_dynamic_colors">Dynamische Farben</string>
</resources>
</resources>
+3 -1
View File
@@ -631,6 +631,8 @@
<string name="preference_search_bar_color">Color</string>
<string name="preference_search_bar_auto_focus">Open keyboard</string>
<string name="preference_search_bar_auto_focus_summary">Automatically show the keyboard when opening the search</string>
<string name="preference_search_bar_launch_on_enter">Launch on enter</string>
<string name="preference_search_bar_launch_on_enter_summary">Launch highlighted match or quick-action upon tapping go</string>
<string name="preference_hidden_items">Hidden search results</string>
<string name="preference_hidden_items_summary">Manage hidden apps and search results</string>
<string name="preference_screen_tags">Tags</string>
@@ -756,4 +758,4 @@
<string name="gesture_failed_message">You have performed a \"%1$s\" gesture. This gesture is currently set to trigger a \"%2$s\" action. However, the action could not be performed for the following reason:</string>
<string name="missing_permission_accessibility_gesture_failed">The launcher\'s accessibility service needs to be enabled to perform this action.</string>
<string name="missing_permission_accessibility_gesture_settings">This action requires the launcher\'s accessibility service to be enabled.</string>
</resources>
</resources>
@@ -222,6 +222,7 @@ message Settings {
Dark = 2;
}
SearchBarColors color = 3;
bool launch_on_enter = 4;
}
SearchBarSettings search_bar = 20;