Closed HarshBhatia closed 8 years ago
I thought about exposing this API, but it's not super straightforward. For example, if the view is in the process of an animation, what does getText()
return? Does it return the text it's animating to?
What's your use-case for this API?
I am making a video view counter, the videos are embedded in cards in the recyclerview. Each video has an onCompletionListener which increments the respective video's views by one, each time it is played. Those views are also embedded in the card as TickerView and onCompletion I need to setText(viewTicker.getText()+1)
You can call TickerView.addAnimatorListener
to add a listener to know whenever the animation completes, and in your case you can easily keep track of the current value of the ticker yourself and increment it that way.
Otherwise, you would have to do something like Integer.valueOf(tickerView.getText())
which isn't too great anyway.
getText() fucntion is not available in TickerView