I remember reading something months ago about how ...
# compose
s
I remember reading something months ago about how animating text size in Compose is a bad idea, and I think it was more than just the layout could break to a new line. I also remember when Flutter was struggling with performance around animating font sizes, because each font size had to be rendered and cached (details could be wrong). Does any sort of performance limitation like this exist in Compose, or is it safe to animate text size (instead of doing something more complicated like scale) for simple single-line text?
s
https://developer.android.com/develop/ui/compose/animation/quick-guide#animate-text-scale You might be looking for this:
Copy code
style = LocalTextStyle.current.copy(textMotion = TextMotion.Animated)
s
Thank you! That's exactly what I was looking for. Smoothes everything out.
🦜 1
w
Is there any general solution to the multi-line break problem? I've always wanted something that animated the line break on initial wrap, but then kept it in place if the text re-shrunk, to avoid shifting lines again as the text went back and forth, but never been motivated enough to write that.