diff options
| author | Jules Aguillon | 2021-12-30 00:26:05 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2021-12-30 00:26:05 +0100 |
| commit | 093a00c572a29d292bc6bbb09559611cb61e1331 (patch) | |
| tree | 945f43f7c4bbff2bf5d22fa3a12c7d42833dc97d /srcs/juloo.keyboard2/Theme.java | |
| parent | 40b1ec63a932606fb432ee81801acf147e9ee70e (diff) | |
| download | unexpected-keyboard-093a00c572a29d292bc6bbb09559611cb61e1331.tar.gz unexpected-keyboard-093a00c572a29d292bc6bbb09559611cb61e1331.zip | |
Add 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
Diffstat (limited to 'srcs/juloo.keyboard2/Theme.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Theme.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Theme.java b/srcs/juloo.keyboard2/Theme.java index e90074b..04f365f 100644 --- a/srcs/juloo.keyboard2/Theme.java +++ b/srcs/juloo.keyboard2/Theme.java @@ -25,7 +25,7 @@ public class Theme public Theme(Context context, AttributeSet attrs) { - TypedArray s = context.getTheme().obtainStyledAttributes(attrs, R.styleable.keyboard, 0, R.style.Dark); + TypedArray s = context.getTheme().obtainStyledAttributes(attrs, R.styleable.keyboard, 0, 0); keyBgPaint.setColor(s.getColor(R.styleable.keyboard_colorKey, 0)); keyDownBgPaint.setColor(s.getColor(R.styleable.keyboard_colorKeyActivated, 0)); // colorKeyboard = s.getColor(R.styleable.keyboard_colorKeyboard, 0); |
