mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-18 16:03:12 +00:00
set background drawable for keyboardWrapperView
This commit is contained in:
parent
11655eea26
commit
7b9644a9ae
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue