robinhood / ticker

An Android text view with scrolling text change animation
https://medium.com/robinhood-engineering/hello-ticker-20eaf6e51689
Apache License 2.0
4.38k stars 462 forks source link

Font with variable character widths causes animation glitch #114

Open Frank1234 opened 4 years ago

Frank1234 commented 4 years ago

The animation doesn't look well when I center the carachers horizontally and use a font that has characters with a variable width (not monospace). Clipping occurs when animating from a small with to a large width character and visa versa, and the character that is animating in often doesn't start in the center (so also animates horizontally)

Is there a way to overcome this?

jinatonic commented 4 years ago

You can try using setAnimateMeasurementChange. I haven't looked into properly supporting non monospace font so a proper fix might be much more involved.