【发布时间】:2014-03-17 11:29:45
【问题描述】:
我有倒计时 5 秒的取景器。
我已经应用了淡入淡出动画,但效果只是第一次出现。
即当 5 变为 4. 从那时起没有动画生效。
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();
}
}
我想要所有视图的动画。
我该怎么做?
【问题讨论】:
标签: android animation viewflipper