Another one about Curved text / Timetext it seems ...
# compose-wear
t
Another one about Curved text / Timetext it seems they do not support the shadow part of the text styles that can be useful to increase a little contrast over images. My other workaround would have been to use a dark background on the timetext but I can't figure out what I could put in
startCurvedContent
and
endCurvedContent
to add a round borders on each side like a curved chip.
j
Typically we recommend not having TimeText and the contents underneath overlap. But there is support for putting gradients behind using
CurvedModifiers
with
TimeText.
@Sergio Sancho can you provide details
t
(The shadow is enabled on the title / subtitle in this screen)
s
We may add support for more styles in the future, no current plans. Also, currently, we don't let you configure the actual time text curved modifier, nor for the whole curved row (you can freely configure it for the text before and after the time text). You can do a custom implementation of TimeText, and add a chip-like background using something like:
basicCurvedText(
...
modifier = CurvedModifier.background(Color.White.copy(alpha = 0.3f), StrokeCap.Round)
)
t
Ok thanks, so I was not mad it's not possible with current TimeText. Thanks for the CurvedModifier example I was not able to find it on the samples. Probably an oversight.
s
No problem. Notice that it is a CurvedModifier, they are similar but not the same as Modifier
Nice!