I have been looking for a solution to my problem. But my code seems to be ok.
I'll try to explain: I have a TextView with android:alpha="0" in my layout definition. I want (when a image is clicked) show that TextView with an AlphaAnimation, from 0.0f to 1.0f.
My problem is that when I click the image, nothing happens. But the strange thing, is that if I set it's alpha to 1 in the layout definition, and I click the image, I can see the animation (alpha 1 -> alpha 0 -> alpha 1).
What am I doing wrong?
My code:
TextView tv = (TextView) findViewById(R.id.number);
AlphaAnimation animation1 = new AlphaAnimation(0.0f, 1.0f);
animation1.setDuration(1000);
animation1.setFillAfter(true);
tv.startAnimation(animation1);
Thanks in advance.