mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-20 00:40:29 +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)
|
R.styleable.KeyboardTheme, defStyle, 0)
|
||||||
val keyboardViewStyleId = themeAttr.getResourceId(R.styleable.KeyboardTheme_mainKeyboardViewStyle, 0)
|
val keyboardViewStyleId = themeAttr.getResourceId(R.styleable.KeyboardTheme_mainKeyboardViewStyle, 0)
|
||||||
themeAttr.recycle()
|
themeAttr.recycle()
|
||||||
val styleAttr = context.obtainStyledAttributes(keyboardViewStyleId, intArrayOf(android.R.attr.background))
|
val backgroundDrawable = Settings.getInstance().current.mColors.keyboardBackground
|
||||||
setBackgroundResource(styleAttr.getResourceId(0, 0))
|
if (backgroundDrawable == null) {
|
||||||
styleAttr.recycle()
|
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