Remote keyboard UI update
The intent of this patch is to update the UI/UX of the remote keyboard plugin. It is related to the T10232 Phabricator task. I have considered using the key appearance, however I went for a more flat and simple look. The following UI related changes have been made:
KeyboardViewusage (which was deprecated in API 29 and is targeted mainly at "real" keyboards), we can return any
Viewthat we like. The UI is split into two parts, leveraging the provided APIs distinction between the input view and the candidates view. The main part is the input view that contains three actions, similar to the old keyboard.
- The candidates view is used instead of
Toastfor displaying connection details upon clicking the state action (the phonelink icon). It has a simple fade-in animation for this view.
- The keyboard actions have a grayish ripple effect on Lollipop or higher and a simple grayish background change on pre Lollipop.
- The preferences screen does not constrain the text to single line anymore.
- Theming based on user preference for the app on API 17+, 14-16 uses system preference. If a change happens (either user switches app theme or the system does it), the keyboard views are automatically recreated.
Notes and considerations
There are some other changes and comments worth mentioning:
- I have added four colors (two for
nightqualifier and two for without any). However, I feel these colors should already been defined and used, especially as we inherit a material theme. Themes, styles, colors and text appearances are not utilized enough and it is something I would like to work on in the future to achieve a more uniform look across the app (and correctly style snackbars, I have seen the TODO).
- There are two additional strings and the two that were already there have been reworded to be more user friendly. How are localization changes handled?
- It's quite taller than the older keyboard; I can reduce padding if this is an issue.
- Research icon colors on pre 21 devices, I have seen issues with dark theme
The remote keyboard functionality should stay exactly the same, as I have only touched the UI parts of the plugin. Please report any theming issues/inconsistencies (especially older API versions), UI suggestions and feedback.