What would i have to do to emulate the Active butt...
# compose
r
What would i have to do to emulate the Active button look in compose?
a
probably a
Row
of `IconToggleButton`s
r
Worded poorly, I meant the shaded look of the active button in this instance
a
you might be able to try adding a
Modifier.background()
to the icon button if and only if it is checked? i’m not sure what color you’d use exactly… but i assume its
Color.Black
with some percentage of alpha applied
r
hm, I was hoping for something existing in MaterialTheme or something that could figure out the active shade given dark theme and the existing compose theme but that'd work
a
yeah, i agree with you that i don’t think this is something that is natively supported by the material compose library. i would recommend filing a feature request here to support this: https://issuetracker.google.com/issues?q=componentid:742043%20status:open my suggestion was mainly just a workaround until then 🙂
r
Sounds good, thanks
c
there's no built in "active/inactive" but colours can be copied and modified, for the example above you could move the colour closer to / the same as the background specified in the current theme. Maybe it'd be nice to make it an extension function of androidx color with a boolean parameter?