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

Add support to prevent ticking of units as suffixes #67

Closed karanrajpal14 closed 6 years ago

karanrajpal14 commented 7 years ago

I'm currently using your library to display instantaneous values of flow from my sensor and what's happening is that the unit (L/m) is a suffix and it's ticking every time the value changes which, ideally, shouldn't happen. Any idea how I'd be dealing with a situation like this?

jinatonic commented 6 years ago

Sorry for the late reply, this should only happen when the number of digits change for the displayed value, correct? If so, I'll look into how we can optimize our replacement logic for prefixes and suffixes.

karanrajpal14 commented 6 years ago

No problem. In a way, you're right. That should happen only when the number of digits change on the right but in my case, I have two digits before the unit, three after, and then a unit and it still cycles it when the number changes and I'm not sure if it's supposed to be so.

Would you please look into it?

jinatonic commented 6 years ago

This will be covered in the next major release which will have quite a few breaking API changes.