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 d84170ee..3183e40c 100644
--- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt
@@ -259,13 +259,15 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
mBackgroundColor = context.config.backgroundColor
mPrimaryColor = context.getAdjustedPrimaryColor()
- var newBgColor = mBackgroundColor
if (changedView == mini_keyboard_view) {
- newBgColor = newBgColor.darkenColor(4)
+ val previewBackground = background as LayerDrawable
+ previewBackground.findDrawableByLayerId(R.id.button_background_shape).applyColorFilter(mBackgroundColor.darkenColor(4))
+ previewBackground.findDrawableByLayerId(R.id.button_background_stroke).applyColorFilter(mBackgroundColor.lightenColor())
+ background = previewBackground
+ } else {
+ background.applyColorFilter(mBackgroundColor.darkenColor(2))
}
- background.applyColorFilter(newBgColor.darkenColor(2))
-
val rippleBg = resources.getDrawable(R.drawable.clipboard_background, context.theme) as RippleDrawable
val layerDrawable = rippleBg.findDrawableByLayerId(R.id.clipboard_background_holder) as LayerDrawable
layerDrawable.findDrawableByLayerId(R.id.clipboard_background_shape).applyColorFilter(mBackgroundColor)
@@ -755,7 +757,11 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
}
- mPreviewText!!.background.applyColorFilter(mBackgroundColor.darkenColor(4))
+ val previewBackground = mPreviewText!!.background as LayerDrawable
+ previewBackground.findDrawableByLayerId(R.id.button_background_shape).applyColorFilter(mBackgroundColor.darkenColor(4))
+ previewBackground.findDrawableByLayerId(R.id.button_background_stroke).applyColorFilter(mBackgroundColor.lightenColor())
+
+ mPreviewText!!.background = previewBackground
mPreviewText!!.setTextColor(mTextColor)
mPreviewText!!.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED))
val popupWidth = Math.max(mPreviewText!!.measuredWidth, key.width)
diff --git a/app/src/main/res/drawable/minikeyboard_background.xml b/app/src/main/res/drawable/minikeyboard_background.xml
index fd7c32c2..1b7bc32f 100644
--- a/app/src/main/res/drawable/minikeyboard_background.xml
+++ b/app/src/main/res/drawable/minikeyboard_background.xml
@@ -6,4 +6,14 @@
+
+ -
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/minikeyboard_selected_background.xml b/app/src/main/res/drawable/minikeyboard_selected_background.xml
index 219fb4ba..13def77b 100644
--- a/app/src/main/res/drawable/minikeyboard_selected_background.xml
+++ b/app/src/main/res/drawable/minikeyboard_selected_background.xml
@@ -3,7 +3,7 @@
-
-
+