diff options
| author | Jules Aguillon | 2021-12-28 16:47:19 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2021-12-28 16:47:19 +0100 |
| commit | 0190cfc29a07a5a281f0fd1bdac4999ba65c19ba (patch) | |
| tree | 160ffb4e68af482093240f28b7022f38e0cee52b /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | dd24ad323bf4a5c13295214e7b492398e98b8d04 (diff) | |
| download | unexpected-keyboard-0190cfc29a07a5a281f0fd1bdac4999ba65c19ba.tar.gz unexpected-keyboard-0190cfc29a07a5a281f0fd1bdac4999ba65c19ba.zip | |
Turn Config into a singleton object
The goal is to remove a cast of the 'context' into 'Keyboard2'.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index c85af4d..4430df4 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -45,14 +45,14 @@ public class Keyboard2View extends View _vibratorService = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE); _handler = new Handler(this); _theme = new Theme(getContext(), attrs); - refreshConfig(((Keyboard2)context).getConfig(), null); + _config = Config.globalConfig(); + refreshConfig(null); setOnTouchListener(this); } /* Internally calls [reset()]. */ - public void refreshConfig(Config config, KeyboardData kw) + public void refreshConfig(KeyboardData kw) { - _config = config; if (kw != null) setKeyboard(kw); // handle layout options then calls reset(). } |
