Added MD3 switch

This commit is contained in:
Prathamesh More 2022-06-06 21:35:58 +05:30
parent 33a0d113b8
commit b28d5678bc
9 changed files with 46 additions and 50 deletions

View file

@ -135,7 +135,9 @@ fun Button.accentTextColor() {
fun MaterialButton.accentBackgroundColor() {
if (materialYou) return
backgroundTintList = ColorStateList.valueOf(context.accentColor())
backgroundTintList = ColorStateList(
arrayOf(intArrayOf(android.R.attr.state_enabled), intArrayOf()),
intArrayOf(context.accentColor(), context.accentColor().addAlpha(0.12f)))
}
fun MaterialButton.accentOutlineColor() {