diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index dff52d3..67722c5 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -57,7 +57,7 @@ class Config horizontalMargin = res.getDimension(R.dimen.horizontal_margin); preciseRepeat = true; characterSize = 1.f; - accents = 0; + accents = 1; // from prefs refresh(); // initialized later @@ -83,7 +83,7 @@ class Config horizontalMargin = getDipPref(prefs, "horizontal_margin", horizontalMargin); preciseRepeat = prefs.getBoolean("precise_repeat", preciseRepeat); characterSize = prefs.getFloat("character_size", characterSize); - accents = Integer.valueOf(prefs.getString("accents", "")); + accents = Integer.valueOf(prefs.getString("accents", "1")); } private float getDipPref(SharedPreferences prefs, String pref_name, float def) diff --git a/srcs/juloo.keyboard2/Emoji.java b/srcs/juloo.keyboard2/Emoji.java index 3b1f2fd..8f563cb 100644 --- a/srcs/juloo.keyboard2/Emoji.java +++ b/srcs/juloo.keyboard2/Emoji.java @@ -12,10 +12,13 @@ public class Emoji extends KeyValue { private final String _desc; + private static HashMap emojis_by_name = new HashMap(); + protected Emoji(String name, String bytecode, String desc) { super(name, bytecode, CHAR_NONE, EVENT_NONE, 0); _desc = desc; + emojis_by_name.put(name, this); } public String getDescription() @@ -29,7 +32,7 @@ public class Emoji extends KeyValue public static Emoji getEmojiByName(String name) { - return ((Emoji)KeyValue.getKeyByName(name)); + return emojis_by_name.get(name); } public static Emoji[] getEmojisByGroup(int group_id)