https://kotlinlang.org logo
#compose
Title
# compose
j

jolo

02/14/2020, 9:07 AM
And another question: What’s the current way to add Opacity to a text?
dev-03
used
withOpacity
but that was marked as a hack. Is the
Opacity
composable the only way to do it in
dev-04
?
a

amar_1995

02/14/2020, 10:26 AM
I think you need to use
ProvideEmphasis
Copy code
ProvideEmphasis(emphasisLevels.medium) {
    Text(
        text = "someText"
    )
}
a

Andrey Kulikov

02/14/2020, 11:22 AM
yes, it is the current replacement for
withOpacity
j

jolo

02/14/2020, 12:56 PM
Thanks!
l

Leland Richardson [G]

02/14/2020, 5:39 PM
we should probably have an opacity DrawModifier, no?
j

jolo

02/16/2020, 7:42 AM
I think that an Opacity Modifier would indeed make sense!