Skip to content

Commit 6c4d6a0

Browse files
Added Ukrainian keyboard layout. As Gboard layout. Close #252
1 parent 0226f5d commit 6c4d6a0

File tree

4 files changed

+190
-0
lines changed

4 files changed

+190
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ fun Context.getKeyboardLanguages(): ArrayList<RadioItem> {
188188
RadioItem(LANGUAGE_SPANISH, getKeyboardLanguageText(LANGUAGE_SPANISH)),
189189
RadioItem(LANGUAGE_SWEDISH, getKeyboardLanguageText(LANGUAGE_SWEDISH)),
190190
RadioItem(LANGUAGE_TURKISH_Q, getKeyboardLanguageText(LANGUAGE_TURKISH_Q)),
191+
RadioItem(LANGUAGE_UKRAINIAN, getKeyboardLanguageText(LANGUAGE_UKRAINIAN)),
191192
RadioItem(LANGUAGE_VIETNAMESE_TELEX, getKeyboardLanguageText(LANGUAGE_VIETNAMESE_TELEX)),
192193
)
193194
}
@@ -212,6 +213,7 @@ fun Context.getKeyboardLanguageText(language: Int): String {
212213
LANGUAGE_SPANISH -> getString(R.string.translation_spanish)
213214
LANGUAGE_SWEDISH -> getString(R.string.translation_swedish)
214215
LANGUAGE_TURKISH_Q -> "${getString(R.string.translation_turkish)} (Q)"
216+
LANGUAGE_UKRAINIAN -> getString(R.string.translation_ukrainian)
215217
LANGUAGE_VIETNAMESE_TELEX -> "${getString(R.string.translation_vietnamese)} (Telex)"
216218
else -> "${getString(R.string.translation_english)} (QWERTY)"
217219
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const val LANGUAGE_DANISH = 16
4545
const val LANGUAGE_FRENCH_BEPO = 17
4646
const val LANGUAGE_VIETNAMESE_TELEX = 18
4747
const val LANGUAGE_POLISH = 19
48+
const val LANGUAGE_UKRAINIAN = 20
4849

4950
// keyboard height percentage options
5051
const val KEYBOARD_HEIGHT_70_PERCENT = 70

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
413413
LANGUAGE_SWEDISH -> R.xml.keys_letters_swedish
414414
LANGUAGE_SPANISH -> R.xml.keys_letters_spanish_qwerty
415415
LANGUAGE_TURKISH_Q -> R.xml.keys_letters_turkish_q
416+
LANGUAGE_UKRAINIAN -> R.xml.keys_letters_ukrainian
416417
else -> R.xml.keys_letters_english_qwerty
417418
}
418419
}
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
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 app:keyWidth="8.33%p">
38+
<Key
39+
app:keyEdgeFlags="left"
40+
app:keyLabel="й" />
41+
<Key
42+
app:keyLabel="ц"
43+
app:popupCharacters="1"
44+
app:popupKeyboard="@xml/keyboard_popup_template"
45+
app:topSmallNumber="1" />
46+
<Key
47+
app:keyLabel="у"
48+
app:popupCharacters="2"
49+
app:popupKeyboard="@xml/keyboard_popup_template"
50+
app:topSmallNumber="2" />
51+
<Key
52+
app:keyLabel="к"
53+
app:popupCharacters="3"
54+
app:popupKeyboard="@xml/keyboard_popup_template"
55+
app:topSmallNumber="3" />
56+
<Key
57+
app:keyLabel="е"
58+
app:popupCharacters="4"
59+
app:popupKeyboard="@xml/keyboard_popup_template"
60+
app:topSmallNumber="4" />
61+
<Key
62+
app:keyLabel="н"
63+
app:popupCharacters="5"
64+
app:popupKeyboard="@xml/keyboard_popup_template"
65+
app:topSmallNumber="5" />
66+
<Key
67+
app:keyLabel="г"
68+
app:popupCharacters="6"
69+
app:popupKeyboard="@xml/keyboard_popup_template"
70+
app:topSmallNumber="6" />
71+
<Key
72+
app:keyLabel="ш"
73+
app:popupCharacters="7"
74+
app:popupKeyboard="@xml/keyboard_popup_template"
75+
app:topSmallNumber="7" />
76+
<Key
77+
app:keyLabel="щ"
78+
app:popupCharacters="8"
79+
app:popupKeyboard="@xml/keyboard_popup_template"
80+
app:topSmallNumber="8" />
81+
<Key
82+
app:keyLabel="з"
83+
app:popupCharacters="9"
84+
app:popupKeyboard="@xml/keyboard_popup_template"
85+
app:topSmallNumber="9" />
86+
<Key
87+
app:keyLabel="х"
88+
app:popupCharacters="0"
89+
app:popupKeyboard="@xml/keyboard_popup_template"
90+
app:topSmallNumber="0" />
91+
<Key
92+
app:keyEdgeFlags="right"
93+
app:keyLabel="ї" />
94+
</Row>
95+
<Row app:keyWidth="8.33%p">
96+
<Key
97+
app:keyEdgeFlags="left"
98+
app:keyLabel="ф" />
99+
<Key app:keyLabel="і" />
100+
<Key app:keyLabel="в" />
101+
<Key app:keyLabel="а" />
102+
<Key app:keyLabel="п" />
103+
<Key app:keyLabel="р" />
104+
<Key app:keyLabel="о" />
105+
<Key app:keyLabel="л" />
106+
<Key app:keyLabel="д" />
107+
<Key app:keyLabel="ж" />
108+
<Key app:keyLabel="є" />
109+
<Key
110+
app:keyEdgeFlags="right"
111+
app:keyLabel="'" />
112+
</Row>
113+
<Row>
114+
<Key
115+
app:code="-1"
116+
app:keyEdgeFlags="left"
117+
app:keyIcon="@drawable/ic_caps_outline_vector"
118+
app:keyWidth="10%p" />
119+
<Key
120+
app:keyLabel="я"
121+
app:keyWidth="8%p" />
122+
<Key
123+
app:keyLabel="ч"
124+
app:keyWidth="8%p" />
125+
<Key
126+
app:keyLabel="с"
127+
app:keyWidth="8%p" />
128+
<Key
129+
app:keyLabel="м"
130+
app:keyWidth="8%p" />
131+
<Key
132+
app:keyLabel="и"
133+
app:keyWidth="8%p" />
134+
<Key
135+
app:keyLabel="т"
136+
app:keyWidth="8%p" />
137+
<Key
138+
app:keyLabel="ь"
139+
app:keyWidth="8%p" />
140+
<Key
141+
app:keyLabel="б"
142+
app:keyWidth="8%p" />
143+
<Key
144+
app:keyLabel="ю"
145+
app:keyWidth="8%p" />
146+
<Key
147+
app:keyLabel="ґ"
148+
app:keyWidth="8%p" />
149+
<Key
150+
app:code="-5"
151+
app:isRepeatable="true"
152+
app:keyEdgeFlags="right"
153+
app:keyIcon="@drawable/ic_clear_vector"
154+
app:keyWidth="10%p" />
155+
</Row>
156+
<Row>
157+
<Key
158+
app:code="-2"
159+
app:keyEdgeFlags="left"
160+
app:keyLabel="123"
161+
app:keyWidth="15%p" />
162+
<Key
163+
app:keyLabel=","
164+
app:keyWidth="10%p" />
165+
<Key
166+
app:code="-6"
167+
app:keyEdgeFlags="left"
168+
app:keyIcon="@drawable/ic_emoji_emotions_outline_vector"
169+
app:keyWidth="10%p"
170+
app:secondaryKeyIcon="@drawable/ic_language_outlined" />
171+
<Key
172+
app:code="32"
173+
app:isRepeatable="true"
174+
app:keyWidth="40%p" />
175+
<Key
176+
app:keyLabel="."
177+
app:keyWidth="10%p"
178+
app:popupCharacters=",?!;:…"
179+
app:popupKeyboard="@xml/keyboard_popup_template" />
180+
<Key
181+
app:code="-4"
182+
app:keyEdgeFlags="right"
183+
app:keyIcon="@drawable/ic_enter_vector"
184+
app:keyWidth="15%p" />
185+
</Row>
186+
</Keyboard>

0 commit comments

Comments
 (0)