mirror of
https://github.com/FossifyOrg/Keyboard.git
synced 2026-03-10 10:07:31 -04:00
Merge pull request #70 from Belarusan/patch-1
Add Belarusan Cyrillic and Latin layouts
This commit is contained in:
@@ -39,6 +39,8 @@ import org.fossify.keyboard.databases.ClipsDatabase
|
||||
import org.fossify.keyboard.helpers.Config
|
||||
import org.fossify.keyboard.helpers.INPUT_METHOD_SUBTYPE_VOICE
|
||||
import org.fossify.keyboard.helpers.LANGUAGE_ARABIC
|
||||
import org.fossify.keyboard.helpers.LANGUAGE_BELARUSIAN_CYRL
|
||||
import org.fossify.keyboard.helpers.LANGUAGE_BELARUSIAN_LATN
|
||||
import org.fossify.keyboard.helpers.LANGUAGE_BENGALI
|
||||
import org.fossify.keyboard.helpers.LANGUAGE_BULGARIAN
|
||||
import org.fossify.keyboard.helpers.LANGUAGE_CENTRAL_KURDISH
|
||||
@@ -268,6 +270,8 @@ fun Context.getKeyboardLanguagesRadioItems(): ArrayList<RadioItem> {
|
||||
fun Context.getKeyboardLanguageText(language: Int): String {
|
||||
return when (language) {
|
||||
LANGUAGE_ARABIC -> getString(R.string.translation_arabic)
|
||||
LANGUAGE_BELARUSIAN_CYRL -> "${getString(R.string.translation_belarusian)} (Cyrillic)"
|
||||
LANGUAGE_BELARUSIAN_LATN -> "${getString(R.string.translation_belarusian)} (Latin)"
|
||||
LANGUAGE_BENGALI -> getString(R.string.translation_bengali)
|
||||
LANGUAGE_BULGARIAN -> getString(R.string.translation_bulgarian)
|
||||
LANGUAGE_CENTRAL_KURDISH -> getString(R.string.translation_central_kurdish)
|
||||
|
||||
@@ -54,10 +54,14 @@ const val LANGUAGE_ESPERANTO = 23
|
||||
const val LANGUAGE_HEBREW = 24
|
||||
const val LANGUAGE_ARABIC = 25
|
||||
const val LANGUAGE_CENTRAL_KURDISH = 26
|
||||
const val LANGUAGE_BELARUSIAN_CYRL = 27
|
||||
const val LANGUAGE_BELARUSIAN_LATN = 28
|
||||
|
||||
// Keep this sorted
|
||||
val SUPPORTED_LANGUAGES = listOf(
|
||||
LANGUAGE_ARABIC,
|
||||
LANGUAGE_BELARUSIAN_CYRL,
|
||||
LANGUAGE_BELARUSIAN_LATN,
|
||||
LANGUAGE_BENGALI,
|
||||
LANGUAGE_BULGARIAN,
|
||||
LANGUAGE_CENTRAL_KURDISH,
|
||||
|
||||
@@ -439,6 +439,8 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
|
||||
private fun getKeyboardLayoutXML(): Int {
|
||||
return when (baseContext.config.keyboardLanguage) {
|
||||
LANGUAGE_ARABIC -> R.xml.keys_letters_arabic
|
||||
LANGUAGE_BELARUSIAN_CYRL -> R.xml.keys_letters_belarusian_cyrl
|
||||
LANGUAGE_BELARUSIAN_LATN -> R.xml.keys_letters_belarusian_latn
|
||||
LANGUAGE_BENGALI -> R.xml.keys_letters_bengali
|
||||
LANGUAGE_BULGARIAN -> R.xml.keys_letters_bulgarian
|
||||
LANGUAGE_CENTRAL_KURDISH -> R.xml.keys_letters_central_kurdish
|
||||
|
||||
186
app/src/main/res/xml/keys_letters_belarusian_cyrl.xml
Normal file
186
app/src/main/res/xml/keys_letters_belarusian_cyrl.xml
Normal file
@@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<Row app:isNumbersRow="true">
|
||||
<Key
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="1"
|
||||
app:topSmallNumber="1" />
|
||||
<Key
|
||||
app:keyLabel="2"
|
||||
app:topSmallNumber="2" />
|
||||
<Key
|
||||
app:keyLabel="3"
|
||||
app:topSmallNumber="3" />
|
||||
<Key
|
||||
app:keyLabel="4"
|
||||
app:topSmallNumber="4" />
|
||||
<Key
|
||||
app:keyLabel="5"
|
||||
app:topSmallNumber="5" />
|
||||
<Key
|
||||
app:keyLabel="6"
|
||||
app:topSmallNumber="6" />
|
||||
<Key
|
||||
app:keyLabel="7"
|
||||
app:topSmallNumber="7" />
|
||||
<Key
|
||||
app:keyLabel="8"
|
||||
app:topSmallNumber="8" />
|
||||
<Key
|
||||
app:keyLabel="9"
|
||||
app:topSmallNumber="9" />
|
||||
<Key
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyLabel="0"
|
||||
app:topSmallNumber="0" />
|
||||
</Row>
|
||||
<Row app:keyWidth="8.33%p">
|
||||
<Key
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="й" />
|
||||
<Key
|
||||
app:keyLabel="ц"
|
||||
app:popupCharacters="1"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="1" />
|
||||
<Key
|
||||
app:keyLabel="у"
|
||||
app:popupCharacters="2"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="2" />
|
||||
<Key
|
||||
app:keyLabel="к"
|
||||
app:popupCharacters="3"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="3" />
|
||||
<Key
|
||||
app:keyLabel="е"
|
||||
app:popupCharacters="4є"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="4" />
|
||||
<Key
|
||||
app:keyLabel="н"
|
||||
app:popupCharacters="5"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="5" />
|
||||
<Key
|
||||
app:keyLabel="г"
|
||||
app:popupCharacters="6ґ"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="6" />
|
||||
<Key
|
||||
app:keyLabel="ш"
|
||||
app:popupCharacters="7щ"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="7" />
|
||||
<Key
|
||||
app:keyLabel="ў"
|
||||
app:popupCharacters="8"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="8" />
|
||||
<Key
|
||||
app:keyLabel="з"
|
||||
app:popupCharacters="9"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="9" />
|
||||
<Key
|
||||
app:keyLabel="х"
|
||||
app:popupCharacters="0"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="0" />
|
||||
<Key
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyLabel="’"
|
||||
app:popupCharacters="'" />
|
||||
</Row>
|
||||
<Row app:keyWidth="8.33%p">
|
||||
<Key
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="ф" />
|
||||
<Key app:keyLabel="ы" />
|
||||
<Key app:keyLabel="в" />
|
||||
<Key app:keyLabel="а" />
|
||||
<Key app:keyLabel="п" />
|
||||
<Key app:keyLabel="р" />
|
||||
<Key app:keyLabel="о" />
|
||||
<Key app:keyLabel="л" />
|
||||
<Key app:keyLabel="д" />
|
||||
<Key app:keyLabel="ж" />
|
||||
<Key app:keyLabel="э" />
|
||||
<Key
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyLabel="ё" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key
|
||||
app:code="-1"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyIcon="@drawable/ic_caps_outline_vector"
|
||||
app:keyWidth="14%p" />
|
||||
<Key
|
||||
app:keyLabel="я"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="ч"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="с"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="м"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="і"
|
||||
app:popupCharacters="иї"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="т"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="ь"
|
||||
app:popupCharacters="ъ"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="б"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:keyLabel="ю"
|
||||
app:keyWidth="8%p" />
|
||||
<Key
|
||||
app:code="-5"
|
||||
app:isRepeatable="true"
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyIcon="@drawable/ic_clear_vector"
|
||||
app:keyWidth="14%p" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key
|
||||
app:code="-2"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="\?123"
|
||||
app:keyWidth="15%p" />
|
||||
<Key
|
||||
app:keyLabel=","
|
||||
app:keyWidth="10%p" />
|
||||
<Key
|
||||
app:code="-6"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
|
||||
app:keyWidth="10%p"
|
||||
app:secondaryKeyIcon="@drawable/ic_language_outlined" />
|
||||
<Key
|
||||
app:code="32"
|
||||
app:isRepeatable="true"
|
||||
app:keyWidth="40%p" />
|
||||
<Key
|
||||
app:keyLabel="."
|
||||
app:keyWidth="10%p"
|
||||
app:popupCharacters=",?!;:…"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key
|
||||
app:code="-4"
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyIcon="@drawable/ic_enter_vector"
|
||||
app:keyWidth="15%p" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
173
app/src/main/res/xml/keys_letters_belarusian_latn.xml
Normal file
173
app/src/main/res/xml/keys_letters_belarusian_latn.xml
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<Row app:isNumbersRow="true">
|
||||
<Key
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="1"
|
||||
app:topSmallNumber="1" />
|
||||
<Key
|
||||
app:keyLabel="2"
|
||||
app:topSmallNumber="2" />
|
||||
<Key
|
||||
app:keyLabel="3"
|
||||
app:topSmallNumber="3" />
|
||||
<Key
|
||||
app:keyLabel="4"
|
||||
app:topSmallNumber="4" />
|
||||
<Key
|
||||
app:keyLabel="5"
|
||||
app:topSmallNumber="5" />
|
||||
<Key
|
||||
app:keyLabel="6"
|
||||
app:topSmallNumber="6" />
|
||||
<Key
|
||||
app:keyLabel="7"
|
||||
app:topSmallNumber="7" />
|
||||
<Key
|
||||
app:keyLabel="8"
|
||||
app:topSmallNumber="8" />
|
||||
<Key
|
||||
app:keyLabel="9"
|
||||
app:topSmallNumber="9" />
|
||||
<Key
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyLabel="0"
|
||||
app:topSmallNumber="0" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="q"
|
||||
app:popupCharacters="1"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="1" />
|
||||
<Key
|
||||
app:keyLabel="w"
|
||||
app:popupCharacters="2"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="2" />
|
||||
<Key
|
||||
app:keyLabel="e"
|
||||
app:popupCharacters="3ę"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="3" />
|
||||
<Key
|
||||
app:keyLabel="r"
|
||||
app:popupCharacters="4"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="4" />
|
||||
<Key
|
||||
app:keyLabel="t"
|
||||
app:popupCharacters="5"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="5" />
|
||||
<Key
|
||||
app:keyLabel="y"
|
||||
app:popupCharacters="6"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="6" />
|
||||
<Key
|
||||
app:keyLabel="u"
|
||||
app:popupCharacters="7ŭ"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="7" />
|
||||
<Key
|
||||
app:keyLabel="i"
|
||||
app:popupCharacters="8"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="8" />
|
||||
<Key
|
||||
app:keyLabel="o"
|
||||
app:popupCharacters="9ó"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="9" />
|
||||
<Key
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyLabel="p"
|
||||
app:popupCharacters="0"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template"
|
||||
app:topSmallNumber="0" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key
|
||||
app:horizontalGap="5%"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="a"
|
||||
app:popupCharacters="ą"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key
|
||||
app:keyLabel="s"
|
||||
app:popupCharacters="śš"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key app:keyLabel="d" />
|
||||
<Key app:keyLabel="f" />
|
||||
<Key app:keyLabel="g" />
|
||||
<Key app:keyLabel="h" />
|
||||
<Key app:keyLabel="j" />
|
||||
<Key app:keyLabel="k" />
|
||||
<Key
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyLabel="l"
|
||||
app:popupCharacters="ł"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key
|
||||
app:code="-1"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyIcon="@drawable/ic_caps_outline_vector"
|
||||
app:keyWidth="15%p" />
|
||||
<Key
|
||||
app:keyLabel="z"
|
||||
app:popupCharacters="źžż"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key app:keyLabel="x" />
|
||||
<Key
|
||||
app:keyLabel="c"
|
||||
app:popupCharacters="ćč"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key app:keyLabel="v" />
|
||||
<Key app:keyLabel="b" />
|
||||
<Key
|
||||
app:keyLabel="n"
|
||||
app:popupCharacters="ń"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key app:keyLabel="m" />
|
||||
<Key
|
||||
app:code="-5"
|
||||
app:isRepeatable="true"
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyIcon="@drawable/ic_clear_vector"
|
||||
app:keyWidth="15%p" />
|
||||
</Row>
|
||||
<Row>
|
||||
<Key
|
||||
app:code="-2"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyLabel="\?123"
|
||||
app:keyWidth="15%p" />
|
||||
<Key
|
||||
app:keyLabel=","
|
||||
app:keyWidth="10%p" />
|
||||
<Key
|
||||
app:code="-6"
|
||||
app:keyEdgeFlags="left"
|
||||
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
|
||||
app:keyWidth="10%p"
|
||||
app:secondaryKeyIcon="@drawable/ic_language_outlined" />
|
||||
<Key
|
||||
app:code="32"
|
||||
app:isRepeatable="true"
|
||||
app:keyWidth="40%p" />
|
||||
<Key
|
||||
app:keyLabel="."
|
||||
app:keyWidth="10%p"
|
||||
app:popupCharacters=",?!;:…"
|
||||
app:popupKeyboard="@xml/keyboard_popup_template" />
|
||||
<Key
|
||||
app:code="-4"
|
||||
app:keyEdgeFlags="right"
|
||||
app:keyIcon="@drawable/ic_enter_vector"
|
||||
app:keyWidth="15%p" />
|
||||
</Row>
|
||||
</Keyboard>
|
||||
Reference in New Issue
Block a user