From 9c947d790b754302b2b9f0c94cc321be0368f17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Guti=C3=A9rrez=20Alonso?= Date: Fri, 18 Mar 2022 18:32:43 +0100 Subject: [PATCH] Added Spanish keyboard to the selection menu --- .../simplemobiletools/keyboard/activities/SettingsActivity.kt | 3 +++ .../kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt | 1 + .../simplemobiletools/keyboard/services/SimpleKeyboardIME.kt | 1 + 3 files changed, 5 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt index 2b212f5..4e3a9e3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/activities/SettingsActivity.kt @@ -12,6 +12,7 @@ import com.simplemobiletools.keyboard.helpers.LANGUAGE_ENGLISH_QWERTY import com.simplemobiletools.keyboard.helpers.LANGUAGE_ENGLISH_QWERTZ import com.simplemobiletools.keyboard.helpers.LANGUAGE_FRENCH import com.simplemobiletools.keyboard.helpers.LANGUAGE_RUSSIAN +import com.simplemobiletools.keyboard.helpers.LANGUAGE_SPANISH import kotlinx.android.synthetic.main.activity_settings.* import java.util.* import kotlin.system.exitProcess @@ -116,6 +117,7 @@ class SettingsActivity : SimpleActivity() { RadioItem(LANGUAGE_ENGLISH_QWERTY, getKeyboardLanguageText(LANGUAGE_ENGLISH_QWERTY)), RadioItem(LANGUAGE_ENGLISH_QWERTZ, getKeyboardLanguageText(LANGUAGE_ENGLISH_QWERTZ)), RadioItem(LANGUAGE_FRENCH, getKeyboardLanguageText(LANGUAGE_FRENCH)), + RadioItem(LANGUAGE_SPANISH, getKeyboardLanguageText(LANGUAGE_SPANISH)), RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)) ) @@ -131,6 +133,7 @@ class SettingsActivity : SimpleActivity() { LANGUAGE_FRENCH -> getString(R.string.translation_french) LANGUAGE_RUSSIAN -> getString(R.string.translation_russian) LANGUAGE_ENGLISH_QWERTZ -> "${getString(R.string.translation_english)} (QWERTZ)" + LANGUAGE_SPANISH -> getString(R.string.translation_spanish) else -> "${getString(R.string.translation_english)} (QWERTY)" } } diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt index c6e7d1d..7cfbb73 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt @@ -21,3 +21,4 @@ const val LANGUAGE_ENGLISH_QWERTY = 0 const val LANGUAGE_RUSSIAN = 1 const val LANGUAGE_FRENCH = 2 const val LANGUAGE_ENGLISH_QWERTZ = 3 +const val LANGUAGE_SPANISH = 4 diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index b2e7dba..62a02f7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -246,6 +246,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL LANGUAGE_FRENCH -> R.xml.keys_letters_french LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian LANGUAGE_ENGLISH_QWERTZ -> R.xml.keys_letters_english_qwertz + LANGUAGE_SPANISH -> R.xml.keys_letters_spanish_qwerty else -> R.xml.keys_letters_english_qwerty } }