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

Auto resize #45

Closed mahi05 closed 7 years ago

mahi05 commented 7 years ago

Please add a feature to Auto resize texts when texts exceeds tickerView bounds. Like, I have to give fix width to tickerView and manage its text size according to its width. Then how can I manage it?

jinatonic commented 7 years ago

You can just set the textview width to match_parent, and it will auto adjust the drawing bounds accordingly. Or wrap_content will be fine but when the width of the text changes you might see some jank. To overcome this, you can call TickerView.setAnimateMeasurementChange.