I have viewflipper for countdown of 5 seconds.
I have applied fading animation but the effect happens only for the first time.
i.e when 5 changes to 4. from thereon no animation takes effect.
public class TatSplash extends Activity implements OnClickListener{
ViewFlipper timer;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.tatsplash);
timer = (ViewFlipper) findViewById(R.id.timer);
timer.setOnClickListener(this);
timer.setFlipInterval(1000);
timer.startFlipping();
AlphaAnimation animation = new AlphaAnimation(1.0f, 0.0f);
animation.setDuration(1000);
timer.setAnimation(animation);
}
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
timer.showNext();
}
}
I want the animations for all views.
How can i do this ?
Did you try...?
viewFlipper.setInAnimation();
viewFlipper.setOutAnimation();