From 5165a3e9f84cf73555eca39b0cb1326130a329ab Mon Sep 17 00:00:00 2001 From: angrezichatterbox Date: Wed, 10 Jul 2024 21:36:03 +0530 Subject: [PATCH] feat:Added seperate keyboard selection for all languages --- app/src/main/AndroidManifest.xml | 92 ++++++++++++++++++- .../org/scribe/services/EnglishKeyboardIME.kt | 7 ++ .../org/scribe/services/FrenchKeyboardIME.kt | 8 ++ .../org/scribe/services/GermanKeyboardIME.kt | 7 ++ .../org/scribe/services/ItalianKeyboardIME.kt | 8 ++ .../scribe/services/PortugueseKeyboardIME.kt | 8 ++ .../org/scribe/services/RussianKeyboardIME.kt | 7 ++ .../org/scribe/services/SimpleKeyboardIME.kt | 17 +--- .../org/scribe/services/SpanishKeyboardIME.kt | 7 ++ .../org/scribe/services/SwedishKeyboardIME.kt | 7 ++ app/src/main/res/values/strings.xml | 8 ++ app/src/main/res/xml/method_english.xml | 9 ++ app/src/main/res/xml/method_french.xml | 9 ++ app/src/main/res/xml/method_german.xml | 6 ++ app/src/main/res/xml/method_italian.xml | 9 ++ app/src/main/res/xml/method_portuguese.xml | 9 ++ app/src/main/res/xml/method_russian.xml | 9 ++ app/src/main/res/xml/method_spanish.xml | 9 ++ app/src/main/res/xml/method_swedish.xml | 9 ++ 19 files changed, 229 insertions(+), 16 deletions(-) create mode 100644 app/src/main/kotlin/org/scribe/services/EnglishKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/FrenchKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/GermanKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/ItalianKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/PortugueseKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/RussianKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/SpanishKeyboardIME.kt create mode 100644 app/src/main/kotlin/org/scribe/services/SwedishKeyboardIME.kt create mode 100644 app/src/main/res/xml/method_english.xml create mode 100644 app/src/main/res/xml/method_french.xml create mode 100644 app/src/main/res/xml/method_german.xml create mode 100644 app/src/main/res/xml/method_italian.xml create mode 100644 app/src/main/res/xml/method_portuguese.xml create mode 100644 app/src/main/res/xml/method_russian.xml create mode 100644 app/src/main/res/xml/method_spanish.xml create mode 100644 app/src/main/res/xml/method_swedish.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 044ead9d..4b8d8737 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,16 +31,102 @@ android:exported="false" /> + + + + android:resource="@xml/method_english" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + R.xml.keys_letters_french - LANGUAGE_GERMAN -> R.xml.keys_letters_german - LANGUAGE_ITALIAN -> R.xml.keys_letters_italian - LANGUAGE_PORTUGUESE -> R.xml.keys_letters_portuguese - LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian - LANGUAGE_SPANISH -> R.xml.keys_letters_spanish - LANGUAGE_SWEDISH -> R.xml.keys_letters_swedish - else -> R.xml.keys_letters_english - } } -} diff --git a/app/src/main/kotlin/org/scribe/services/SpanishKeyboardIME.kt b/app/src/main/kotlin/org/scribe/services/SpanishKeyboardIME.kt new file mode 100644 index 00000000..a23bff7f --- /dev/null +++ b/app/src/main/kotlin/org/scribe/services/SpanishKeyboardIME.kt @@ -0,0 +1,7 @@ +package org.scribe.services + +import org.scribe.R + +class SpanishKeyboardIME : SimpleKeyboardIME() { + override fun getKeyboardLayoutXML(): Int = R.xml.keys_letters_spanish +} diff --git a/app/src/main/kotlin/org/scribe/services/SwedishKeyboardIME.kt b/app/src/main/kotlin/org/scribe/services/SwedishKeyboardIME.kt new file mode 100644 index 00000000..cb6c8c4c --- /dev/null +++ b/app/src/main/kotlin/org/scribe/services/SwedishKeyboardIME.kt @@ -0,0 +1,7 @@ +package org.scribe.services + +import org.scribe.R + +class SwedishKeyboardIME : SimpleKeyboardIME() { + override fun getKeyboardLayoutXML(): Int = R.xml.keys_letters_spanish +} diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index fd88b691..05541112 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1510,6 +1510,14 @@ MD5 + English(US) + German + French + Italian + Português + Russian + spanish + swedish @string/january diff --git a/app/src/main/res/xml/method_english.xml b/app/src/main/res/xml/method_english.xml new file mode 100644 index 00000000..e42ad3e2 --- /dev/null +++ b/app/src/main/res/xml/method_english.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/xml/method_french.xml b/app/src/main/res/xml/method_french.xml new file mode 100644 index 00000000..64c820d7 --- /dev/null +++ b/app/src/main/res/xml/method_french.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/xml/method_german.xml b/app/src/main/res/xml/method_german.xml new file mode 100644 index 00000000..36b3e1c4 --- /dev/null +++ b/app/src/main/res/xml/method_german.xml @@ -0,0 +1,6 @@ + + + diff --git a/app/src/main/res/xml/method_italian.xml b/app/src/main/res/xml/method_italian.xml new file mode 100644 index 00000000..e3ef309e --- /dev/null +++ b/app/src/main/res/xml/method_italian.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/xml/method_portuguese.xml b/app/src/main/res/xml/method_portuguese.xml new file mode 100644 index 00000000..6f003bb0 --- /dev/null +++ b/app/src/main/res/xml/method_portuguese.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/xml/method_russian.xml b/app/src/main/res/xml/method_russian.xml new file mode 100644 index 00000000..3cffdf69 --- /dev/null +++ b/app/src/main/res/xml/method_russian.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/xml/method_spanish.xml b/app/src/main/res/xml/method_spanish.xml new file mode 100644 index 00000000..3025f4c1 --- /dev/null +++ b/app/src/main/res/xml/method_spanish.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/xml/method_swedish.xml b/app/src/main/res/xml/method_swedish.xml new file mode 100644 index 00000000..50383bb0 --- /dev/null +++ b/app/src/main/res/xml/method_swedish.xml @@ -0,0 +1,9 @@ + + +