Show click feedback with enter too

This commit is contained in:
Naveen 2023-01-31 21:32:41 +05:30
parent 96cc36d13a
commit 8c5e422b3b
1 changed files with 6 additions and 1 deletions

View File

@ -654,7 +654,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
if (key.focused || keyCode == KEYCODE_ENTER) {
keyBackground.applyColorFilter(mPrimaryColor)
val keyColor = if (key.pressed) {
mPrimaryColor.adjustAlpha(0.8f)
} else {
mPrimaryColor
}
keyBackground.applyColorFilter(keyColor)
} else if (showKeyBorders && drawableId == R.drawable.keyboard_key_selector_outlined) {
val keyColor = getKeyColor(key.pressed)
keyBackground.applyColorFilter(keyColor)