mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-30 08:59:41 +01:00
fix input layout theming dark/light
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
6e42a52a9a
commit
23d436f314
@ -287,9 +287,19 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme) {
|
|||||||
|
|
||||||
fun colorTextInputLayout(textInputLayout: TextInputLayout) {
|
fun colorTextInputLayout(textInputLayout: TextInputLayout) {
|
||||||
withElementColor(textInputLayout) { color ->
|
withElementColor(textInputLayout) { color ->
|
||||||
// TODO calculate error color based on primary color, dark/light aware
|
|
||||||
val errorColor = Color.GRAY
|
val errorColor = Color.GRAY
|
||||||
textInputLayout.boxStrokeColor = color
|
textInputLayout.setBoxStrokeColorStateList(
|
||||||
|
ColorStateList(
|
||||||
|
arrayOf(
|
||||||
|
intArrayOf(-android.R.attr.state_focused),
|
||||||
|
intArrayOf(android.R.attr.state_focused)
|
||||||
|
),
|
||||||
|
intArrayOf(
|
||||||
|
Color.GRAY,
|
||||||
|
color
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
textInputLayout.setErrorIconTintList(
|
textInputLayout.setErrorIconTintList(
|
||||||
ColorStateList(
|
ColorStateList(
|
||||||
arrayOf(
|
arrayOf(
|
||||||
|
Loading…
Reference in New Issue
Block a user