Merge pull request #168 from Merkost/space_fix

Space button background fixed
This commit is contained in:
Tibor Kaputa 2023-05-19 10:36:34 +02:00 committed by GitHub
commit 73b0017895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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
}