Im a fresher to android..and now i need to animate a text sequence given below and after one cycle the text color should change from red to white gradually.
A
An
And
Andr
Andro
Androi
Android
Im a fresher to android..and now i need to animate a text sequence given below and after one cycle the text color should change from red to white gradually.
A
An
And
Andr
Andro
Androi
Android
Since you're using a TextView, you can use a loop to gradually change the color and append the text dynamically e.g.
char[] letters = "Android".toCharArray();
for (int i = 0; i < letters.length; i++) {
Thread.sleep(1000);
view.append(letters[i]);
view.setTextColor(color);
}
A helpful link on creating the gradient is here Generating gradients programmatically? and to use that to create a color, you can use
view.setTextColor(Color.rgb(r, g, b));