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

Countdown Timer transition 00:00:20 -> 00:00:19 #72

Closed snooplsm closed 6 years ago

snooplsm commented 6 years ago

Thanks for this library, I think I will be able to do great things with it. Sadly I am greedy and would like another feature:

It would be nice if the numbers did not count up when going from 0->9 when the overall number is getting smaller. Not sure if there is a way to do this.

My character list is: static char[] characters = new char[]{TickerUtils.EMPTY_CHAR, ':', '9', '8', '7', '6', '5', '4', '3', '2', '1', '0'};

giphy

As you can see when the ticker goes from 07:53:20 to 07:53:19, the ticker does a huge animation when all I want it to do is go from 9 to 0 and 2 to 1, however I can only specify one character list.

jinatonic commented 6 years ago

Yeah I was thinking about this shortly after releasing the library (exactly for the purposes of implementing a countdown timer or even just a clock). Unfortunately it's not super trivial to do with the current architecture.

I am planning a major version bump in the near future with breaking API changes so you can better specify the animation behavior from character to character. It involves a somewhat significant amount of work that I don't quite have time for at the moment. I'll try to prioritize it as best as I can - hopefully within the next month or so.

jinatonic commented 6 years ago

relevant: #83