From 64cb3900756f5b7969b2af62a08f83fbdc19f5f7 Mon Sep 17 00:00:00 2001 From: akasaka Date: Mon, 22 Feb 2021 08:14:37 +0900 Subject: [PATCH 01/16] (nitpicking) Add "space on 0" proper description --- res/values/strings.xml | 3 ++- res/xml/prefs.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 99c29b1..c36fb0b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,5 +1,5 @@ - + https://github.com/Clam-/TraditionalT9/wiki/Traditional-T9-keypad-IME-for-Android Traditional T9 Traditional T9 @@ -76,6 +76,7 @@ Translate keys Enable to send translated keys to apps, otherwise keymap is for IME only. Space on 0 key + Map space to 0 key if checked, otherwise to # key. Hello world! diff --git a/res/xml/prefs.xml b/res/xml/prefs.xml index 7a76789..5d1064c 100644 --- a/res/xml/prefs.xml +++ b/res/xml/prefs.xml @@ -18,7 +18,7 @@ Date: Mon, 22 Feb 2021 18:38:25 +0900 Subject: [PATCH 02/16] Fix https://github.com/Clam-/TraditionalT9/issues/29 --- src/org/nyanya/android/traditionalt9/TraditionalT9.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/nyanya/android/traditionalt9/TraditionalT9.java b/src/org/nyanya/android/traditionalt9/TraditionalT9.java index 0f750bb..12ab3ba 100644 --- a/src/org/nyanya/android/traditionalt9/TraditionalT9.java +++ b/src/org/nyanya/android/traditionalt9/TraditionalT9.java @@ -604,7 +604,7 @@ public boolean onKeyDown(int keyCode, KeyEvent event) { } if (!onKeyDown_(keyCode, event)) { - if (key == null || keyRemap) { + if (key == null || !keyRemap) { return false; } else { From d2e590a8175d162de7a66ee920ce14bc8f0d4f70 Mon Sep 17 00:00:00 2001 From: akasaka Date: Mon, 22 Feb 2021 18:38:57 +0900 Subject: [PATCH 03/16] Fix https://github.com/Clam-/TraditionalT9/issues/29 (symmetric part, oops) --- src/org/nyanya/android/traditionalt9/TraditionalT9.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/nyanya/android/traditionalt9/TraditionalT9.java b/src/org/nyanya/android/traditionalt9/TraditionalT9.java index 12ab3ba..428c793 100644 --- a/src/org/nyanya/android/traditionalt9/TraditionalT9.java +++ b/src/org/nyanya/android/traditionalt9/TraditionalT9.java @@ -795,7 +795,7 @@ public boolean onKeyUp(int keyCode, KeyEvent event) { } if (!onKeyUp_(keyCode, event)) { - if (key == null || keyRemap) { + if (key == null || !keyRemap) { return false; } else { From 7120664cb17708b3198d6e9b094278791c5b65ef Mon Sep 17 00:00:00 2001 From: akasaka Date: Mon, 22 Feb 2021 20:50:13 +0900 Subject: [PATCH 04/16] Don't add Ukrainian chars to Russian language database --- src/org/nyanya/android/traditionalt9/CharMap.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/org/nyanya/android/traditionalt9/CharMap.java b/src/org/nyanya/android/traditionalt9/CharMap.java index 5fb4f1b..bb46535 100644 --- a/src/org/nyanya/android/traditionalt9/CharMap.java +++ b/src/org/nyanya/android/traditionalt9/CharMap.java @@ -73,8 +73,7 @@ public class CharMap { ruMap.put('+', 0); ruMap.put('0', 0); - // add extra characters for other Cyrillic maps. - ruMap.put('ґ', 2); ruMap.put('є', 3); ruMap.put('і', 4); ruMap.put('ї', 4);// Ukrainian chars + // Stub for Bulgarian chars // Stub for Bielorussian chars // etc @@ -83,7 +82,11 @@ public class CharMap { CHARTABLE.add(2, Collections.unmodifiableMap(endefritmap)); CHARTABLE.add(3, Collections.unmodifiableMap(endefritmap)); CHARTABLE.add(4, Collections.unmodifiableMap(endefritmap)); - CHARTABLE.add(5, Collections.unmodifiableMap(ruMap)); + + // add extra characters for other Cyrillic maps. + Map ukMap = new HashMap(ruMap); + ukMap.put('ґ', 2); ukMap.put('є', 3); ukMap.put('і', 4); ukMap.put('ї', 4);// Ukrainian chars + CHARTABLE.add(5, Collections.unmodifiableMap(ukMap)); } protected static final char[][] ENT9TABLE = { { '0', '+' }, From 043a348b837bd5284e2e3b99709652e94bdfaf5b Mon Sep 17 00:00:00 2001 From: akasaka Date: Mon, 22 Feb 2021 22:29:00 +0900 Subject: [PATCH 05/16] Allow disabling candidate scroll animation, more intelligent frequency updates --- res/layout/mainview.xml | 39 ++++++++----- res/values-ru/strings.xml | 12 ++-- res/values/strings.xml | 6 +- res/xml/prefs.xml | 6 ++ .../android/traditionalt9/CandidateView.java | 37 ++++++++----- .../traditionalt9/InterfaceHandler.java | 13 ++--- .../nyanya/android/traditionalt9/Quirks.java | 29 ++++++++++ .../nyanya/android/traditionalt9/T9DB.java | 55 +++++++++++++++---- .../android/traditionalt9/TraditionalT9.java | 29 ++++++---- .../traditionalt9/TraditionalT9Settings.java | 4 +- 10 files changed, 164 insertions(+), 66 deletions(-) create mode 100644 src/org/nyanya/android/traditionalt9/Quirks.java diff --git a/res/layout/mainview.xml b/res/layout/mainview.xml index 55c99bb..08ae0f2 100644 --- a/res/layout/mainview.xml +++ b/res/layout/mainview.xml @@ -1,61 +1,70 @@ + android:orientation="horizontal"> + android:longClickable="true"> - - + + +