views:

1195

answers:

2

Hello

I need to set initial transparency for a TextView but I don't know how to do it. On iPhone it can be done easily with alpha property. I've tried to set alpha using AlphaAnimation but no good it doesn't work. It just returns to 100% alpha when it ends.

  AlphaAnimation anim = new AlphaAnimation(1, 0.2f);
  anim.setDuration (5000);
  textView.startAnimation (anim);

Any ideas guys?

+2  A: 

You can set the alpha channel directly in a color value that you assign to the TextView. See Available Resource Types.

RickNotFred
It's not the same. That way I can't animate alpha changes
Kostia Dombrovsky
You aren't asking for animation in the alpha value so don't be surprised if we don't tell you how to do it.
Janusz
A: 

Yes, it worked! Thank you very much, you really saved me alot of work.

i was looking for a long time..

ashish