diff options
| author | Jules Aguillon | 2022-06-05 17:26:34 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2022-06-05 17:46:22 +0200 |
| commit | e10c587dc5286db64a6f55010637f0c3f9f62d59 (patch) | |
| tree | 2c39dd330f1915e3c1f8bb353c5db13c3a6c3bd4 /srcs/juloo.keyboard2/EmojiKeyButton.java | |
| parent | d03e96da3e99e1e0edb78367499c22f574079583 (diff) | |
| download | unexpected-keyboard-e10c587dc5286db64a6f55010637f0c3f9f62d59.tar.gz unexpected-keyboard-e10c587dc5286db64a6f55010637f0c3f9f62d59.zip | |
Refactor: Abstract KeyValue fields
The meaning of the public fields of KeyValue was quite complicated and
not handled consistently accross the app.
Make these fields private and add a more abstract API on top.
The meaning of these fields changed recently and it wasn't an easy
change. I plan on making more changes in the future.
Diffstat (limited to 'srcs/juloo.keyboard2/EmojiKeyButton.java')
| -rw-r--r-- | srcs/juloo.keyboard2/EmojiKeyButton.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/EmojiKeyButton.java b/srcs/juloo.keyboard2/EmojiKeyButton.java index 1f5a3a0..d551ac5 100644 --- a/srcs/juloo.keyboard2/EmojiKeyButton.java +++ b/srcs/juloo.keyboard2/EmojiKeyButton.java @@ -15,8 +15,8 @@ public class EmojiKeyButton extends Button super(context, attrs); setOnClickListener(this); _key = KeyValue.getKeyByName(attrs.getAttributeValue(null, "key")); - setText(_key.symbol); - if ((_key.flags & KeyValue.FLAG_KEY_FONT) != 0) + setText(_key.getString()); + if (_key.hasFlags(KeyValue.FLAG_KEY_FONT)) setTypeface(Theme.getSpecialKeyFont(context)); } |
