diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/KeyboardWrapperView.kt b/app/src/main/java/org/dslul/openboard/inputmethod/latin/KeyboardWrapperView.kt index 444fb1351..44c0bbe2c 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/KeyboardWrapperView.kt +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/KeyboardWrapperView.kt @@ -130,8 +130,12 @@ class KeyboardWrapperView @JvmOverloads constructor( R.styleable.KeyboardTheme, defStyle, 0) val keyboardViewStyleId = themeAttr.getResourceId(R.styleable.KeyboardTheme_mainKeyboardViewStyle, 0) themeAttr.recycle() - val styleAttr = context.obtainStyledAttributes(keyboardViewStyleId, intArrayOf(android.R.attr.background)) - setBackgroundResource(styleAttr.getResourceId(0, 0)) - styleAttr.recycle() + val backgroundDrawable = Settings.getInstance().current.mColors.keyboardBackground + if (backgroundDrawable == null) { + val styleAttr = context.obtainStyledAttributes(keyboardViewStyleId, intArrayOf(android.R.attr.background)) + setBackgroundResource(styleAttr.getResourceId(0, 0)) + styleAttr.recycle() + } else + background = backgroundDrawable } } \ No newline at end of file