Typewriter text effect for Jetpack Compose <https...
# feed
m
👍 1
neat 2
👍🏻 1
e
may truncate in the middle of glyphs (due to multi-surrogate codepoints, or combining characters, or emoji, or … lots of cases really)
plus it causes text re-measure on every step
IMO it would be better to measure the text only once and change the styling on each interval
🙏 1
like this, for example. less code, text layout happens once, animation is easily tweakable
Copy code
AnimatedTextAppearance(
    text = AnnotatedString("Hello, world!"),
    animationSpec = tween(durationMillis = 2_000),
)
👏 1