diff --git a/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt b/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt index 9778e12f2..5769c2ca3 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt +++ b/app/src/main/java/com/nextcloud/talk/ui/theme/ViewThemeUtils.kt @@ -136,7 +136,18 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme) { fun colorMaterialButtonBackground(button: MaterialButton) { withElementColor(button) { color -> button.setBackgroundColor(color) - button.setTextColor(theme.colorText) + + val disabledColor = ContextCompat.getColor(button.context, R.color.disabled_text) + val colorStateList = ColorStateList( + arrayOf( + intArrayOf(android.R.attr.state_enabled), + intArrayOf(-android.R.attr.state_enabled) + ), + intArrayOf(theme.colorText, disabledColor) + ) + + button.setTextColor(colorStateList) + button.iconTint = colorStateList } }