diff options
| author | Jules Aguillon | 2021-01-05 00:18:24 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2021-01-05 00:18:24 +0100 |
| commit | 8dc085048acff3ec1d46bdb3eafca0ac0773be25 (patch) | |
| tree | c5784c69138515b48cd569783f1469fa6647f0ad /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | 1cda23ad2c393e4eaee9b15b5d27678c1e3d4e90 (diff) | |
| download | unexpected-keyboard-8dc085048acff3ec1d46bdb3eafca0ac0773be25.tar.gz unexpected-keyboard-8dc085048acff3ec1d46bdb3eafca0ac0773be25.zip | |
Remove the preview popup
This was a half-finished feature:
- Dangerous when typing passwords
- Caused crash on some devices
- Ugly (on its own but also blinking when sliding and not fixed in size)
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 86c78ab..041b881 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -34,13 +34,6 @@ public class Keyboard2View extends View private Handler _handler; private static int _currentWhat = 0; - private KeyPreviewPopup _previewPopup; - - /* - ** TODO: settings: preview_text_size - ** TODO: settings: preview_timeout - ** TODO: disable preview in password fields - */ private Config _config; private float _keyWidth; @@ -64,7 +57,6 @@ public class Keyboard2View extends View _vibratorService = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE); _handler = new Handler(this); _config = ((Keyboard2)context).getConfig(); - _previewPopup = new KeyPreviewPopup(this, _config); _keyBgPaint.setColor(getResources().getColor(R.color.key_bg)); _keyDownBgPaint.setColor(getResources().getColor(R.color.key_down_bg)); _keyLabelPaint = initLabelPaint(_keyLabelPaint, Paint.Align.CENTER, R.color.key_label, R.dimen.label_text_size, null); @@ -273,24 +265,12 @@ public class Keyboard2View extends View { if (key.value != null && (key.flags & (KeyValue.FLAG_LOCKED | KeyValue.FLAG_NOCHAR)) == 0) ((Keyboard2)getContext()).handleKeyUp(key.value, _flags); - // previewNextKeyDown - if (!_config.previewEnabled) - return ; - for (KeyDown k : _downKeys) - if ((k.value.getFlags() & (KeyValue.FLAG_KEY_FONT | KeyValue.FLAG_NOREPEAT | KeyValue.FLAG_NOCHAR)) == 0) - { - _previewPopup.setPreview(k.value, _flags); - return ; - } - _previewPopup.setPreview(null, 0); } private void handleKeyDown(KeyValue key) { if (key == null) return ; - if (_config.previewEnabled && (key.getFlags() & (KeyValue.FLAG_KEY_FONT | KeyValue.FLAG_NOREPEAT | KeyValue.FLAG_NOCHAR)) == 0) - _previewPopup.setPreview(key, _flags); vibrate(); } @@ -395,7 +375,6 @@ public class Keyboard2View extends View public void onDetachedFromWindow() { super.onDetachedFromWindow(); - _previewPopup.forceDismiss(); } private void drawLabel(Canvas canvas, KeyValue k, float x, float y, boolean locked) |
