Added Polish keyboard layout. Copied from an old pull request #212. Numbers are selected by default on long press. Tested.

This commit is contained in:
Dmitriy Chernysh 2023-10-11 21:13:34 +03:00
parent fe1c2ba4ff
commit 0226f5d2d4
4 changed files with 178 additions and 0 deletions

View File

@ -181,6 +181,7 @@ fun Context.getKeyboardLanguages(): ArrayList<RadioItem> {
RadioItem(LANGUAGE_GREEK, getKeyboardLanguageText(LANGUAGE_GREEK)), RadioItem(LANGUAGE_GREEK, getKeyboardLanguageText(LANGUAGE_GREEK)),
RadioItem(LANGUAGE_LITHUANIAN, getKeyboardLanguageText(LANGUAGE_LITHUANIAN)), RadioItem(LANGUAGE_LITHUANIAN, getKeyboardLanguageText(LANGUAGE_LITHUANIAN)),
RadioItem(LANGUAGE_NORWEGIAN, getKeyboardLanguageText(LANGUAGE_NORWEGIAN)), RadioItem(LANGUAGE_NORWEGIAN, getKeyboardLanguageText(LANGUAGE_NORWEGIAN)),
RadioItem(LANGUAGE_POLISH, getKeyboardLanguageText(LANGUAGE_POLISH)),
RadioItem(LANGUAGE_ROMANIAN, getKeyboardLanguageText(LANGUAGE_ROMANIAN)), RadioItem(LANGUAGE_ROMANIAN, getKeyboardLanguageText(LANGUAGE_ROMANIAN)),
RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)), RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)),
RadioItem(LANGUAGE_SLOVENIAN, getKeyboardLanguageText(LANGUAGE_SLOVENIAN)), RadioItem(LANGUAGE_SLOVENIAN, getKeyboardLanguageText(LANGUAGE_SLOVENIAN)),
@ -204,6 +205,7 @@ fun Context.getKeyboardLanguageText(language: Int): String {
LANGUAGE_GREEK -> getString(R.string.translation_greek) LANGUAGE_GREEK -> getString(R.string.translation_greek)
LANGUAGE_LITHUANIAN -> getString(R.string.translation_lithuanian) LANGUAGE_LITHUANIAN -> getString(R.string.translation_lithuanian)
LANGUAGE_NORWEGIAN -> getString(R.string.translation_norwegian) LANGUAGE_NORWEGIAN -> getString(R.string.translation_norwegian)
LANGUAGE_POLISH -> getString(R.string.translation_polish)
LANGUAGE_ROMANIAN -> getString(R.string.translation_romanian) LANGUAGE_ROMANIAN -> getString(R.string.translation_romanian)
LANGUAGE_RUSSIAN -> getString(R.string.translation_russian) LANGUAGE_RUSSIAN -> getString(R.string.translation_russian)
LANGUAGE_SLOVENIAN -> getString(R.string.translation_slovenian) LANGUAGE_SLOVENIAN -> getString(R.string.translation_slovenian)

View File

@ -44,6 +44,7 @@ const val LANGUAGE_SWEDISH = 15
const val LANGUAGE_DANISH = 16 const val LANGUAGE_DANISH = 16
const val LANGUAGE_FRENCH_BEPO = 17 const val LANGUAGE_FRENCH_BEPO = 17
const val LANGUAGE_VIETNAMESE_TELEX = 18 const val LANGUAGE_VIETNAMESE_TELEX = 18
const val LANGUAGE_POLISH = 19
// keyboard height percentage options // keyboard height percentage options
const val KEYBOARD_HEIGHT_70_PERCENT = 70 const val KEYBOARD_HEIGHT_70_PERCENT = 70

View File

@ -406,6 +406,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
LANGUAGE_GREEK -> R.xml.keys_letters_greek LANGUAGE_GREEK -> R.xml.keys_letters_greek
LANGUAGE_LITHUANIAN -> R.xml.keys_letters_lithuanian LANGUAGE_LITHUANIAN -> R.xml.keys_letters_lithuanian
LANGUAGE_NORWEGIAN -> R.xml.keys_letters_norwegian LANGUAGE_NORWEGIAN -> R.xml.keys_letters_norwegian
LANGUAGE_POLISH -> R.xml.keys_letters_polish
LANGUAGE_ROMANIAN -> R.xml.keys_letters_romanian LANGUAGE_ROMANIAN -> R.xml.keys_letters_romanian
LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian
LANGUAGE_SLOVENIAN -> R.xml.keys_letters_slovenian LANGUAGE_SLOVENIAN -> R.xml.keys_letters_slovenian

View File

@ -0,0 +1,174 @@
<?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>