From 25a6e71ee815a196d76358cf132c45eb38a10b35 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 19 Sep 2022 11:41:18 +0200 Subject: Add the Extra Keys option Allows to add more keys to the keyboard from a predefined list. The implementation doesn't use MultiSelectListPreference because it doesn't seem possible to change the item layout to properly show the rendered symbols. --- srcs/juloo.keyboard2/Theme.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'srcs/juloo.keyboard2/Theme.java') diff --git a/srcs/juloo.keyboard2/Theme.java b/srcs/juloo.keyboard2/Theme.java index 1461389..e7c7e7f 100644 --- a/srcs/juloo.keyboard2/Theme.java +++ b/srcs/juloo.keyboard2/Theme.java @@ -42,7 +42,7 @@ public class Theme s.recycle(); _keyLabelPaint = initLabelPaint(Paint.Align.CENTER, null); _keySubLabelPaint = initLabelPaint(Paint.Align.LEFT, null); - Typeface specialKeyFont = getSpecialKeyFont(context); + Typeface specialKeyFont = getKeyFont(context); _specialKeyLabelPaint = initLabelPaint(Paint.Align.CENTER, specialKeyFont); _specialKeySubLabelPaint = initLabelPaint(Paint.Align.LEFT, specialKeyFont); } @@ -69,14 +69,12 @@ public class Theme return (paint); } - private static Typeface _specialKeyFont = null; + private static Typeface _key_font = null; - static public Typeface getSpecialKeyFont(Context context) + static public Typeface getKeyFont(Context context) { - if (_specialKeyFont == null) - { - _specialKeyFont = Typeface.createFromAsset(context.getAssets(), "special_font.ttf"); - } - return _specialKeyFont; + if (_key_font == null) + _key_font = Typeface.createFromAsset(context.getAssets(), "special_font.ttf"); + return _key_font; } } -- cgit v1.2.3