[英]Android how to wait for onComplete method to end before proceeding to the next code
[英]Waiting for ImageView.animate() to end before proceeding with the rest of the code
我是学习android开发的初学者,我试图使用ImageView.animate()。alpha()使用淡入和淡出动画进行图像切换。 我发现图像在动画完成之前发生了变化,因此看不到动画。
我的代码是
ImageView image = (ImageView)findViewById(R.id.imageToChange); image.animate().alpha(0f).setDuration(1000); image.setImageResource(R.drawable.image2);
预先感谢,马特
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.