shortening some code
This commit is contained in:
parent
c2d17f5c3a
commit
c17a79a7b4
|
@ -230,33 +230,13 @@ class MyKeyboard {
|
||||||
*/
|
*/
|
||||||
fun getContentDescription(context: Context): CharSequence {
|
fun getContentDescription(context: Context): CharSequence {
|
||||||
return when (code) {
|
return when (code) {
|
||||||
KEYCODE_SHIFT -> {
|
KEYCODE_SHIFT -> context.getString(R.string.keycode_shift)
|
||||||
context.getString(R.string.keycode_shift)
|
KEYCODE_MODE_CHANGE -> context.getString(R.string.keycode_mode_change)
|
||||||
}
|
KEYCODE_ENTER -> context.getString(R.string.keycode_enter)
|
||||||
|
KEYCODE_DELETE -> context.getString(R.string.keycode_delete)
|
||||||
KEYCODE_MODE_CHANGE -> {
|
KEYCODE_SPACE -> context.getString(R.string.keycode_space)
|
||||||
context.getString(R.string.keycode_mode_change)
|
KEYCODE_EMOJI -> context.getString(R.string.emojis)
|
||||||
}
|
else -> label
|
||||||
|
|
||||||
KEYCODE_ENTER -> {
|
|
||||||
context.getString(R.string.keycode_enter)
|
|
||||||
}
|
|
||||||
|
|
||||||
KEYCODE_DELETE -> {
|
|
||||||
context.getString(R.string.keycode_delete)
|
|
||||||
}
|
|
||||||
|
|
||||||
KEYCODE_SPACE -> {
|
|
||||||
context.getString(R.string.keycode_space)
|
|
||||||
}
|
|
||||||
|
|
||||||
KEYCODE_EMOJI -> {
|
|
||||||
context.getString(R.string.emojis)
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> {
|
|
||||||
label
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue