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 formating for Date/Times? #11

Closed cking24343 closed 8 years ago

cking24343 commented 8 years ago

Would it be possible to add in functionality to extend the capabilities for date/time values? Maybe add logic for timers or countdowns?

jinatonic commented 8 years ago

Logic for timers or countdowns is very specific to your use-case, and it can be easily achieved by having your own logic around the time and simply feed the time data into TickerView. I believe that the current implementation SHOULD work with date/time values as they are no different from any other strings. Perhaps you would need to define a custom character list for your use-case (see TickerUtils for inspiration).

Is there a particular problem that you can't solve with the library as is?

cking24343 commented 8 years ago

Haven't tried just yet. I plan to test this out later this week, time permitting. I just quickly glanced over the code and didn't see a use case that indicated date times, which is what I was wanting to use this for. I'll let you know if I have any comments or questions after looking into it, thanks!

jinatonic commented 8 years ago

Awesome, let me know if there is anything specific for date/time that we currently don't support here since I can see date/time being a very common use-case 😄