When building an `AnnotatedString` how do you spec...
# compose
m
When building an
AnnotatedString
how do you specify an alpha span without specifying the color?
Color.Unspecified.copy(alpha = alpha)
doesn’t work. Note, I’m not building the
AnnotatedString
in a Composable, so I don’t have access to
LocalTextStyle
BTW, I tried the other
SpanStyle
constructor that takes a
Brush
and
alpha
but that doesn’t seem to work (alpha ignored) when
Brush
is set to
null
. Judging by the docs, a non-null
Brush
is needed, but how to hack it for standard
Brush
behavior? Obviously, can’t use
SolidColor(color)
because I don’t have the color (and
Color.Unspecified
) doesn’t work there either.
s
Interesting. You could add string annotations to your text and apply the color later when you have access to a theme.
z
We don’t currently support configuring the alpha separately from the rest of the color. Feel free to file a feature request
m
I created a new issue, but for some reason got this:
New issue created: 316188062 (view access not granted)
z
Weird, that bug just says the description has been deleted
oh it was flagged as abuse somehow
i unflagged, linking to this thread
thank you color 1
m
The only thing I did differently from normal was to select the “Create / In Same Component” button, so it’s possible that it’s related to that.
z
The component looked right. Idk what happened. Buganizer shmuganizer
😀 1