Skip to content

Commit f048ab5

Browse files
authored
Merge pull request #257 from dmitriy-chernysh/add-polish-and-ukrainian-layout
Add Polish and Ukrainian layouts
2 parents fe1c2ba + d678d5f commit f048ab5

File tree

5 files changed

+367
-0
lines changed

5 files changed

+367
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/extensions/Context.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,14 @@ fun Context.getKeyboardLanguages(): ArrayList<RadioItem> {
181181
RadioItem(LANGUAGE_GREEK, getKeyboardLanguageText(LANGUAGE_GREEK)),
182182
RadioItem(LANGUAGE_LITHUANIAN, getKeyboardLanguageText(LANGUAGE_LITHUANIAN)),
183183
RadioItem(LANGUAGE_NORWEGIAN, getKeyboardLanguageText(LANGUAGE_NORWEGIAN)),
184+
RadioItem(LANGUAGE_POLISH, getKeyboardLanguageText(LANGUAGE_POLISH)),
184185
RadioItem(LANGUAGE_ROMANIAN, getKeyboardLanguageText(LANGUAGE_ROMANIAN)),
185186
RadioItem(LANGUAGE_RUSSIAN, getKeyboardLanguageText(LANGUAGE_RUSSIAN)),
186187
RadioItem(LANGUAGE_SLOVENIAN, getKeyboardLanguageText(LANGUAGE_SLOVENIAN)),
187188
RadioItem(LANGUAGE_SPANISH, getKeyboardLanguageText(LANGUAGE_SPANISH)),
188189
RadioItem(LANGUAGE_SWEDISH, getKeyboardLanguageText(LANGUAGE_SWEDISH)),
189190
RadioItem(LANGUAGE_TURKISH_Q, getKeyboardLanguageText(LANGUAGE_TURKISH_Q)),
191+
RadioItem(LANGUAGE_UKRAINIAN, getKeyboardLanguageText(LANGUAGE_UKRAINIAN)),
190192
RadioItem(LANGUAGE_VIETNAMESE_TELEX, getKeyboardLanguageText(LANGUAGE_VIETNAMESE_TELEX)),
191193
)
192194
}
@@ -204,12 +206,14 @@ fun Context.getKeyboardLanguageText(language: Int): String {
204206
LANGUAGE_GREEK -> getString(R.string.translation_greek)
205207
LANGUAGE_LITHUANIAN -> getString(R.string.translation_lithuanian)
206208
LANGUAGE_NORWEGIAN -> getString(R.string.translation_norwegian)
209+
LANGUAGE_POLISH -> getString(R.string.translation_polish)
207210
LANGUAGE_ROMANIAN -> getString(R.string.translation_romanian)
208211
LANGUAGE_RUSSIAN -> getString(R.string.translation_russian)
209212
LANGUAGE_SLOVENIAN -> getString(R.string.translation_slovenian)
210213
LANGUAGE_SPANISH -> getString(R.string.translation_spanish)
211214
LANGUAGE_SWEDISH -> getString(R.string.translation_swedish)
212215
LANGUAGE_TURKISH_Q -> "${getString(R.string.translation_turkish)} (Q)"
216+
LANGUAGE_UKRAINIAN -> getString(R.string.translation_ukrainian)
213217
LANGUAGE_VIETNAMESE_TELEX -> "${getString(R.string.translation_vietnamese)} (Telex)"
214218
else -> "${getString(R.string.translation_english)} (QWERTY)"
215219
}

app/src/main/kotlin/com/simplemobiletools/keyboard/helpers/Constants.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ const val LANGUAGE_SWEDISH = 15
4444
const val LANGUAGE_DANISH = 16
4545
const val LANGUAGE_FRENCH_BEPO = 17
4646
const val LANGUAGE_VIETNAMESE_TELEX = 18
47+
const val LANGUAGE_POLISH = 19
48+
const val LANGUAGE_UKRAINIAN = 20
4749

4850
// keyboard height percentage options
4951
const val KEYBOARD_HEIGHT_70_PERCENT = 70

app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,14 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
406406
LANGUAGE_GREEK -> R.xml.keys_letters_greek
407407
LANGUAGE_LITHUANIAN -> R.xml.keys_letters_lithuanian
408408
LANGUAGE_NORWEGIAN -> R.xml.keys_letters_norwegian
409+
LANGUAGE_POLISH -> R.xml.keys_letters_polish
409410
LANGUAGE_ROMANIAN -> R.xml.keys_letters_romanian
410411
LANGUAGE_RUSSIAN -> R.xml.keys_letters_russian
411412
LANGUAGE_SLOVENIAN -> R.xml.keys_letters_slovenian
412413
LANGUAGE_SWEDISH -> R.xml.keys_letters_swedish
413414
LANGUAGE_SPANISH -> R.xml.keys_letters_spanish_qwerty
414415
LANGUAGE_TURKISH_Q -> R.xml.keys_letters_turkish_q
416+
LANGUAGE_UKRAINIAN -> R.xml.keys_letters_ukrainian
415417
else -> R.xml.keys_letters_english_qwerty
416418
}
417419
}
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Keyboard xmlns:app="http://schemas.android.com/apk/res-auto">
3+
<Row app:isNumbersRow="true">
4+
<Key
5+
app:keyEdgeFlags="left"
6+
app:keyLabel="1"
7+
app:topSmallNumber="1" />
8+
<Key
9+
app:keyLabel="2"
10+
app:topSmallNumber="2" />
11+
<Key
12+
app:keyLabel="3"
13+
app:topSmallNumber="3" />
14+
<Key
15+
app:keyLabel="4"
16+
app:topSmallNumber="4" />
17+
<Key
18+
app:keyLabel="5"
19+
app:topSmallNumber="5" />
20+
<Key
21+
app:keyLabel="6"
22+
app:topSmallNumber="6" />
23+
<Key
24+
app:keyLabel="7"
25+
app:topSmallNumber="7" />
26+
<Key
27+
app:keyLabel="8"
28+
app:topSmallNumber="8" />
29+
<Key
30+
app:keyLabel="9"
31+
app:topSmallNumber="9" />
32+
<Key
33+
app:keyEdgeFlags="right"
34+
app:keyLabel="0"
35+
app:topSmallNumber="0" />
36+
</Row>
37+
<Row>
38+
<Key
39+
app:keyEdgeFlags="left"
40+
app:keyLabel="q"
41+
app:popupCharacters="1"
42+
app:popupKeyboard="@xml/keyboard_popup_template"
43+
app:topSmallNumber="1" />
44+
<Key
45+
app:keyLabel="w"
46+
app:popupCharacters="2"
47+
app:popupKeyboard="@xml/keyboard_popup_template"
48+
app:topSmallNumber="2" />
49+
<Key
50+
app:keyLabel="e"
51+
app:popupCharacters=""
52+
app:popupKeyboard="@xml/keyboard_popup_template"
53+
app:topSmallNumber="3" />
54+
<Key
55+
app:keyLabel="r"
56+
app:popupCharacters="4"
57+
app:popupKeyboard="@xml/keyboard_popup_template"
58+
app:topSmallNumber="4" />
59+
<Key
60+
app:keyLabel="t"
61+
app:popupCharacters="5"
62+
app:popupKeyboard="@xml/keyboard_popup_template"
63+
app:topSmallNumber="5" />
64+
<Key
65+
app:keyLabel="y"
66+
app:popupCharacters="6"
67+
app:popupKeyboard="@xml/keyboard_popup_template"
68+
app:topSmallNumber="6" />
69+
<Key
70+
app:keyLabel="u"
71+
app:popupCharacters="7"
72+
app:popupKeyboard="@xml/keyboard_popup_template"
73+
app:topSmallNumber="7" />
74+
<Key
75+
app:keyLabel="i"
76+
app:popupCharacters="8"
77+
app:popupKeyboard="@xml/keyboard_popup_template"
78+
app:topSmallNumber="8" />
79+
<Key
80+
app:keyLabel="o"
81+
app:popupCharacters=""
82+
app:popupKeyboard="@xml/keyboard_popup_template"
83+
app:topSmallNumber="9" />
84+
<Key
85+
app:keyEdgeFlags="right"
86+
app:keyLabel="p"
87+
app:popupCharacters="0"
88+
app:popupKeyboard="@xml/keyboard_popup_template"
89+
app:topSmallNumber="0" />
90+
</Row>
91+
<Row>
92+
<Key
93+
app:horizontalGap="5%"
94+
app:keyEdgeFlags="left"
95+
app:keyLabel="a"
96+
app:popupCharacters="ą"
97+
app:popupKeyboard="@xml/keyboard_popup_template" />
98+
<Key
99+
app:keyLabel="s"
100+
app:popupCharacters="ś"
101+
app:popupKeyboard="@xml/keyboard_popup_template" />
102+
<Key app:keyLabel="d" />
103+
<Key app:keyLabel="f" />
104+
<Key app:keyLabel="g" />
105+
<Key app:keyLabel="h" />
106+
<Key app:keyLabel="j" />
107+
<Key app:keyLabel="k" />
108+
<Key
109+
app:keyEdgeFlags="right"
110+
app:keyLabel="l"
111+
app:popupCharacters="ł"
112+
app:popupKeyboard="@xml/keyboard_popup_template" />
113+
</Row>
114+
<Row>
115+
<Key
116+
app:code="-1"
117+
app:keyEdgeFlags="left"
118+
app:keyIcon="@drawable/ic_caps_outline_vector"
119+
app:keyWidth="15%p" />
120+
<Key
121+
app:keyLabel="z"
122+
app:popupCharacters="źż"
123+
app:popupKeyboard="@xml/keyboard_popup_template" />
124+
<Key app:keyLabel="x" />
125+
<Key
126+
app:keyLabel="c"
127+
app:popupCharacters="ć"
128+
app:popupKeyboard="@xml/keyboard_popup_template" />
129+
<Key app:keyLabel="v" />
130+
<Key app:keyLabel="b" />
131+
<Key
132+
app:keyLabel="n"
133+
app:popupCharacters="ń"
134+
app:popupKeyboard="@xml/keyboard_popup_template" />
135+
<Key app:keyLabel="m" />
136+
<Key
137+
app:code="-5"
138+
app:isRepeatable="true"
139+
app:keyEdgeFlags="right"
140+
app:keyIcon="@drawable/ic_clear_vector"
141+
app:keyWidth="15%p" />
142+
</Row>
143+
<Row>
144+
<Key
145+
app:code="-2"
146+
app:keyEdgeFlags="left"
147+
app:keyLabel="123"
148+
app:keyWidth="15%p" />
149+
<Key
150+
app:keyLabel=","
151+
app:keyWidth="10%p" />
152+
<Key
153+
app:code="-6"
154+
app:keyEdgeFlags="left"
155+
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
156+
app:keyWidth="10%p"
157+
app:secondaryKeyIcon="@drawable/ic_language_outlined" />
158+
<Key
159+
app:code="32"
160+
app:isRepeatable="true"
161+
app:keyWidth="40%p" />
162+
<Key
163+
app:keyLabel="."
164+
app:keyWidth="10%p"
165+
app:popupCharacters=",?!;:…"
166+
app:popupKeyboard="@xml/keyboard_popup_template" />
167+
<Key
168+
app:code="-4"
169+
app:keyEdgeFlags="right"
170+
app:keyIcon="@drawable/ic_enter_vector"
171+
app:keyWidth="15%p" />
172+
</Row>
173+
</Keyboard>

0 commit comments

Comments
 (0)