abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2.java
diff options
context:
space:
mode:
authorJules Aguillon2021-04-15 23:23:31 +0200
committerJules Aguillon2021-04-15 23:23:31 +0200
commitc22ca7302c16773dbe1971323034dd6e23d9611b (patch)
treea5b84667fc1a8dbee93c75d5935246663f7705a9 /srcs/juloo.keyboard2/Keyboard2.java
parenteac74d3f2283ec9f36e595261ab21716d910c15a (diff)
downloadunexpected-keyboard-c22ca7302c16773dbe1971323034dd6e23d9611b.tar.gz
unexpected-keyboard-c22ca7302c16773dbe1971323034dd6e23d9611b.zip
Stateless KeyboardData class
It was a pain to use. It was also a pain to write this though.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index e036a96..cb1def8 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -34,7 +34,7 @@ public class Keyboard2 extends InputMethodService
PreferenceManager.setDefaultValues(this, R.xml.settings, false);
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
_config = new Config(this);
- updateConfig();
+ _numericKeyboard = KeyboardData.parse(getResources().getXml(R.xml.numeric));
_keyboardView = (Keyboard2View)getLayoutInflater().inflate(R.layout.keyboard, null);
_keyboardView.reset();
}
@@ -96,20 +96,6 @@ public class Keyboard2 extends InputMethodService
}
}
- /*
- ** TODO: move this to Config object
- */
- private void updateConfig()
- {
- SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
-
- _textKeyboard = new KeyboardData(getResources().getXml(_getKeyboardLayoutRes(prefs)));
- if (_config.disableAccentKeys)
- _textKeyboard.removeKeysByFlag(KeyValue.FLAGS_ACCENTS);
- _numericKeyboard = new KeyboardData(getResources().getXml(R.xml.numeric));
- _emojiPane = null;
- }
-
public void handleKeyUp(KeyValue key, int flags)
{
int eventCode = key.getEventCode();