From 13ccdc5108de8d5d130e628248675646db512d07 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 19 Jan 2022 21:19:21 +0100 Subject: [PATCH] use rounded corners at the Delete etc backgrounds --- .../simplemobiletools/keyboard/views/MyKeyboardView.kt | 2 +- app/src/main/res/drawable/key_pressed_background.xml | 9 +++++++++ app/src/main/res/drawable/keyboard_key_selector.xml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/drawable/key_pressed_background.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt index 5cf8b8e..e77e408 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -335,7 +335,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut MSG_SHOW_PREVIEW -> showKey(msg.arg1) MSG_REMOVE_PREVIEW -> mPreviewText!!.visibility = INVISIBLE MSG_REPEAT -> if (repeatKey()) { - val repeat: Message = Message.obtain(this, MSG_REPEAT) + val repeat = Message.obtain(this, MSG_REPEAT) sendMessageDelayed(repeat, REPEAT_INTERVAL.toLong()) } MSG_LONGPRESS -> openPopupIfRequired(msg.obj as MotionEvent) diff --git a/app/src/main/res/drawable/key_pressed_background.xml b/app/src/main/res/drawable/key_pressed_background.xml new file mode 100644 index 0000000..cbbd189 --- /dev/null +++ b/app/src/main/res/drawable/key_pressed_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/src/main/res/drawable/keyboard_key_selector.xml b/app/src/main/res/drawable/keyboard_key_selector.xml index ceb6c03..5259462 100644 --- a/app/src/main/res/drawable/keyboard_key_selector.xml +++ b/app/src/main/res/drawable/keyboard_key_selector.xml @@ -4,5 +4,5 @@ - +