Typing on a physical keyboard while the home screen is shown now opens the
search page and inserts the typed character, so the launcher can be used
without touching the screen. It works for any printable key, appends the
characters in order even when the user types faster than the launcher can
recompose, and the search bar can still be tapped to edit the query with
the on-screen keyboard as usual.
While the search is driven by the keyboard, the search bar's text field is
left unfocused on purpose: a focused text field would make the system show
the on-screen keyboard, which is not wanted when there is a physical
keyboard. The handler therefore inserts and deletes characters itself,
including backspace and enter (to launch the best match).
The behaviour is controlled by a new "Search on typing" preference in
Settings -> Search, which is enabled by default.
Implementation notes:
- The key events are intercepted in SharedLauncherActivity.dispatchKeyEvent,
which is the only place that sees hardware key events while no view has
focus. The scaffold installs the handler while it is shown.
- Key events are not forwarded to the search bar's text field, so the
characters are inserted into the search view model directly.
- SearchBar keeps a TextFieldValue instead of a String so that the cursor
moves to the end of the text when the value is changed from the outside.
Without this the next typed character ended up in front of the text.
* Added "always show battery" toggle
* Newline at end
* Removed comment
* Added newline
* Removed... newline? Github UI, come on now...
Removed unnecessary newline at the end of the file.
* Made setting into a list
* Added migration
---------
Co-authored-by: Valerie <15646950+MM2-0@users.noreply.github.com>
* Initial approach
* Add a new setting so users can choose the amount of widgets screens
* Extract indexed string
* Remove unnecessary Migration6
* Make HomeComponent use the Default widget id
* Add defaultParentId to initial widgets for fresh launch
* Fix migration path
* Feat: grid icon visibility settings and migration support
* fix: remove unnecessary padding
* Feat: Create List View Settings
* fix FavoritesPartProvider
* small fix
* fix favorites
* Remove useless datastore migration
* Change app list default value
* Revert migration 3
* Hide list icon preference if list is not enabled
* Use ListResults for app list
---------
Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
* ContactRepository: try to deduplicate phoneNumbers in a smart way
* AndroidManifest: use CALL_PHONE permission to allow for making phone calls
* Implement CallOnTap with contact results
- contact activities that require permissions we do not have are not
listed
- add CallOnTap setting for phone number results on search behind
contacts settings
* utilize PhoneNumberUtils
* navroute settings/search/contacts
* queryIntentActivities -> resolveActivity
* localization
* Code formatting
* Wrap contact search settings in preference category
---------
Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
* Add style to BinaryClock for 24-hour time
* Use global time format preference for all clock widget styles
* Add support for time format preference to remaining clock styles
---------
Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>