Animation of text in canvas - Android

Hi I have an application in android that draws texts on Canvas using canvas.drawText (). Now I would like to animate the drawing of the text so that it is colored from left to right, like a karaoke animation. Is it possible? Thanks.

Edit:

Now I can do this using streams and redraw the entire canvas every time a new letter appears, which should be shaded or colored.

+4
source share
2 answers

I was able to solve this by using streams and redrawing the entire canvas every time a new letter is shaded or colored.

+2
source

You need to create a main loop with requestAnimationFrame , process the time and change something every X seconds

To create a karaoke effect, I am trying to divide this sentence into two parts. One color, the second white. Each X second translates one letter to another group. Or with a translucent layer

-1
source

Source: https://habr.com/ru/post/1436097/


All Articles