Merge pull request #168 from Merkost/space_fix
Space button background fixed
This commit is contained in:
commit
73b0017895
|
@ -676,9 +676,9 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||
}
|
||||
|
||||
private fun setupKeyBackground(key: MyKeyboard.Key, keyCode: Int, canvas: Canvas) {
|
||||
val keyBackground = when (keyCode) {
|
||||
KEYCODE_SPACE -> getSpaceKeyBackground()
|
||||
KEYCODE_ENTER -> getEnterKeyBackground()
|
||||
val keyBackground = when {
|
||||
keyCode == KEYCODE_SPACE && key.label.isBlank() -> getSpaceKeyBackground()
|
||||
keyCode == KEYCODE_ENTER -> getEnterKeyBackground()
|
||||
else -> mKeyBackground
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue