android两个动画叠加怎么实现
3个回答
展开全部
①Animation设置setAnimationListener(new ReStartAnimationListener())
②ReStartAnimationListener()具体实现
/** * 重复启动动画 */ private class ReStartAnimationListener implements Animation.AnimationListener { public void onAnimationEnd(Animation animation) { // TODO Auto-generated method stub animation.reset(); animation.setAnimationListener(new ReStartAnimationListener()); animation.start(); } public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } public void onAnimationStart(Animation animation) { // TODO Auto-generated method stub } }
②ReStartAnimationListener()具体实现
/** * 重复启动动画 */ private class ReStartAnimationListener implements Animation.AnimationListener { public void onAnimationEnd(Animation animation) { // TODO Auto-generated method stub animation.reset(); animation.setAnimationListener(new ReStartAnimationListener()); animation.start(); } public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } public void onAnimationStart(Animation animation) { // TODO Auto-generated method stub } }
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询