我正在寻求一些关于如何在 Android 中创建杂耍应用程序的建议。当我在图像之间切换时,我需要有 Android 过渡动画。
最佳答案
您可以使用 Android 中的动画类使图像淡入淡出(或者可能使用其他过渡)。这是我用的东西
Animation animation = new AlphaAnimation(1.0f, 0.0f);
animation.setDuration(100);
animation.setRepeatCount(0);
animation.setFillAfter(true);
myView.startAnimation(animation)
完成后加载另一个图像。您可以使用 AnimationListener检测动画结束。
在动画之后做同样的事情,但反转 AlphaAnimation 中的 alpha 值。
关于android - Android 中的幻灯片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3956747/