mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-22 13:09:46 +01:00
theme text buttons's ripple color for Material 3
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
0d52e8a882
commit
e629932262
@ -117,6 +117,10 @@ public class ChooseAccountDialogFragment extends DialogFragment {
|
|||||||
viewThemeUtils.themeDialog(binding.getRoot());
|
viewThemeUtils.themeDialog(binding.getRoot());
|
||||||
viewThemeUtils.themeDialogDivider(binding.divider);
|
viewThemeUtils.themeDialogDivider(binding.divider);
|
||||||
|
|
||||||
|
viewThemeUtils.colorMaterialTextButton(binding.setStatus);
|
||||||
|
viewThemeUtils.colorMaterialTextButton(binding.addAccount);
|
||||||
|
viewThemeUtils.colorMaterialTextButton(binding.manageSettings);
|
||||||
|
|
||||||
// Defining user picture
|
// Defining user picture
|
||||||
binding.currentAccount.userIcon.setTag("");
|
binding.currentAccount.userIcon.setTag("");
|
||||||
|
|
||||||
|
@ -247,6 +247,19 @@ class ViewThemeUtils @Inject constructor(private val theme: ServerTheme, private
|
|||||||
imageView.imageTintList = ColorStateList.valueOf(theme.colorText)
|
imageView.imageTintList = ColorStateList.valueOf(theme.colorText)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun colorMaterialTextButton(button: MaterialButton) {
|
||||||
|
withScheme(button) { scheme ->
|
||||||
|
button.rippleColor = ColorStateList(
|
||||||
|
arrayOf(
|
||||||
|
intArrayOf(android.R.attr.state_pressed)
|
||||||
|
),
|
||||||
|
intArrayOf(
|
||||||
|
calculateDisabledColor(scheme.primary, SURFACE_OPACITY_BUTTON_DISABLED)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun colorMaterialButtonText(button: MaterialButton) {
|
fun colorMaterialButtonText(button: MaterialButton) {
|
||||||
withScheme(button) { scheme ->
|
withScheme(button) { scheme ->
|
||||||
val disabledColor = ContextCompat.getColor(button.context, R.color.disabled_text)
|
val disabledColor = ContextCompat.getColor(button.context, R.color.disabled_text)
|
||||||
|
Loading…
Reference in New Issue
Block a user