abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2View.java
diff options
context:
space:
mode:
authorJules Aguillon2021-04-28 00:23:52 +0200
committerJules Aguillon2021-04-29 01:06:51 +0200
commitd00576ac2d7605c48034dc52e6622f48f680d4ae (patch)
tree4e52e2c1ff1785a2f762fd5de134dfe08a064802 /srcs/juloo.keyboard2/Keyboard2View.java
parentc86a11944873534c140cd07b7c91d63c939b45b6 (diff)
downloadunexpected-keyboard-d00576ac2d7605c48034dc52e6622f48f680d4ae.tar.gz
unexpected-keyboard-d00576ac2d7605c48034dc52e6622f48f680d4ae.zip
Add the "layout" option again
Some versions of android don't allow to configure several languages.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index 0dc76ea..37a210f 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -56,11 +56,12 @@ public class Keyboard2View extends View
super(context, attrs);
_vibratorService = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);
_handler = new Handler(this);
- refreshConfig(((Keyboard2)context).getConfig());
+ refreshConfig(((Keyboard2)context).getConfig(), null);
setOnTouchListener(this);
}
- public void refreshConfig(Config config)
+ /* Internally calls [reset()]. */
+ public void refreshConfig(Config config, KeyboardData kw)
{
Resources res = getResources();
_config = config;
@@ -76,6 +77,8 @@ public class Keyboard2View extends View
Typeface specialKeysFont = ((Keyboard2)getContext()).getSpecialKeyFont();
_specialKeyLabelPaint = initLabelPaint(Paint.Align.CENTER, specialKeysFont);
_specialKeySubLabelPaint = initLabelPaint(Paint.Align.LEFT, specialKeysFont);
+ if (kw != null)
+ setKeyboard(kw); // handle layout options then calls reset().
}
private Paint initLabelPaint(Paint.Align align, Typeface font)