views:

43

answers:

1

is there a way to apply a color to an alpha animation in android? I know how to use the <alpha> element, but i'd like to have the alpha apply a color as well as an alpha so i can hightlight a layout. is this possible?

+1  A: 

Animations can not include color changes in Android--only alpha, rotation, scale, and translation are included.

That said, you can still make color changes by overlaying two objects of different colors on top of each other and fading the top one in or out.

You could also look into a TransitionDrawable or TextSwitcher to accomplish something similar. Hopefully we will be able to get full support for color animations in a future update.

mxrider