mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-02-16 20:00:36 +01:00
adding a french keyboard
This commit is contained in:
parent
ac65318cb3
commit
bd815d8745
@ -9,6 +9,7 @@ import com.simplemobiletools.commons.models.RadioItem
|
||||
import com.simplemobiletools.keyboard.R
|
||||
import com.simplemobiletools.keyboard.extensions.config
|
||||
import com.simplemobiletools.keyboard.helpers.LANGUAGE_ENGLISH
|
||||
import com.simplemobiletools.keyboard.helpers.LANGUAGE_FRENCH
|
||||
import com.simplemobiletools.keyboard.helpers.LANGUAGE_RUSSIAN
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
import java.util.*
|
||||
@ -112,6 +113,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
settings_keyboard_language_holder.setOnClickListener {
|
||||
val items = arrayListOf(
|
||||
RadioItem(LANGUAGE_ENGLISH, getString(R.string.translation_english)),
|
||||
RadioItem(LANGUAGE_FRENCH, getString(R.string.translation_french)),
|
||||
RadioItem(LANGUAGE_RUSSIAN, getString(R.string.translation_russian))
|
||||
)
|
||||
|
||||
@ -122,8 +124,9 @@ class SettingsActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
fun getKeyboardLanguageText() = getString(
|
||||
private fun getKeyboardLanguageText() = getString(
|
||||
when (config.keyboardLanguage) {
|
||||
LANGUAGE_FRENCH -> R.string.translation_french
|
||||
LANGUAGE_RUSSIAN -> R.string.translation_russian
|
||||
else -> R.string.translation_english
|
||||
}
|
||||
|
@ -19,3 +19,4 @@ const val ITEM_CLIP = 1
|
||||
|
||||
const val LANGUAGE_ENGLISH = 0
|
||||
const val LANGUAGE_RUSSIAN = 1
|
||||
const val LANGUAGE_FRENCH = 2
|
||||
|
@ -224,6 +224,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||
|
||||
private fun getKeyboardLayoutXML(): Int {
|
||||
return when (baseContext.config.keyboardLanguage) {
|
||||
LANGUAGE_FRENCH -> R.xml.keys_letters_french
|
||||
LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian
|
||||
else -> R.xml.keys_letters_english
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user