Answer the question
In order to leave comments, you need to log in
How can I make text animation?
Hello! I have, for example, a variable in which there is text:
And I need the symbol "&k" to shift by 1 letter in the loop, for example:
1st iteration: " &k Hello"
2nd iteration: "H &k ello"
3rd iteration: "He &k llo" And so on,
but
when the characters "&k" have no place to move, they go back to the beginning of the text
.
public String text = "Hello";
Answer the question
In order to leave comments, you need to log in
Through .substring try.
- Cut off n characters first: .substring(0, n)
- Cut off from the nth character to the end: .substring(n)
- Glue what happened with your &k
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question