谁能告诉我为什么这个动画不开始?我已经尝试将代码放入onAnimationStart监听器中,并且它永远不会被调用!没有错误,它只是从来没有发生..我一直盯着这个小时!动画未启动! (安卓)
Animation bRegisterAnimation = fadeView(1,0,0);
bRegisterAnimation.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation arg0) {}
public void onAnimationRepeat(Animation arg0) {}
public void onAnimationEnd(Animation arg0) {
bRegister.clearAnimation();
bRegister.setVisibility(View.INVISIBLE);
}
});
bRegister.setAnimation(bRegisterAnimation);
这里是fadeView功能:
public Animation fadeView(float startA, float endA, int delay) {
Animation animation = new AlphaAnimation(startA,endA);
animation.setDuration(1000);
animation.setStartOffset(delay);
return animation;
}
的感谢!
作品像一个魅力,谢谢! – user1118042 2012-02-08 04:45:03