Themes do not dim secondary keys the same way due to the "offset"
mechanism. Instead, use a ratio that is the same for every themes.
It's still possible to override this ratio per theme.
Themes can define the color of each borders independently. Every borders
must have the same width for now. It's possible to set a different width
when the key is activated, thought this is only used to remove borders.
The 4 themes are updated to take advantage of borders.
Since SDK 21, applications can set the background color of the
navigation bar. This is normally simply an item in a theme but it is
more complicated for keyboards.
For the Dark and Light theme. At the same time, use only "web safe
colors" to have nice round numbers and ensure enough contrasts between
colors.
The background color is kept at the previous value, there's not enough
contrast between the background and the keys but that's better than a
solid black background.
MIUI inverts the colors of the app it thinks doesn't implement dark
themes correctly. Also, it inverts the colors in the dumbest possible
way: it doesn't invert all the colors the same way.
It thinks that presumably because I don't use the Material base themes.
Add a "Theme" option to choose between a dark and light theme.
The light theme uses the colors of the dark theme with the luminance
inversed.
The reloading after a configuration change is changed slightly:
- Special handling is needed when the Theme is changed (recreate the views)
- The default implementation of 'onConfigurationChanged' is used
Which triggers more refresh (but don't recreate the views)
- 'onCreateInputView' is no longer needed