From 81803c406a82862602aa5e350fcc07692e9f16a6 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 18 Apr 2021 23:28:49 +0200 Subject: Separate handling of modifiers from KeyValue class KeyValue defines an ADT and some of its values, it now contains public final fields and no internal logic. KeyModifier handles modifiers and accents and creates new instances of KeyValue when needed. This operation is now properly cached. --- srcs/juloo.keyboard2/EmojiKeyButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/EmojiKeyButton.java') diff --git a/srcs/juloo.keyboard2/EmojiKeyButton.java b/srcs/juloo.keyboard2/EmojiKeyButton.java index 00a9a69..de9f206 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.getSymbol(0)); - if ((_key.getFlags() & KeyValue.FLAG_KEY_FONT) != 0) + setText(_key.symbol); + if ((_key.flags & KeyValue.FLAG_KEY_FONT) != 0) setTypeface(((Keyboard2)context).getSpecialKeyFont()); } -- cgit v1.2.3