我正在制作一个包含ImageView
的启动画面。
我想同时淡入和缩小ImageView
。
我使用下面的xml来进行缩小动画:
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXScale="5"
android:toXScale="1"
android:fromYScale="5"
android:toYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000"
android:fillAfter="true">
</scale>
以下是Java代码:
Animation zoomout = AnimationUtils.loadAnimation(this, R.anim.zoomout);
imageView.setAnimation(zoomout);
对于淡入动画,我使用了以下Java代码:
Animation fadeIn = new AlphaAnimation(1, 0);
fadeIn.setInterpolator(new AccelerateInterpolator());
fadeIn.setStartOffset(500);
fadeIn.setDuration(1000);
imageView.setAnimation(fadeIn);
但我无法同时实现这两个效果。
如何在ImageView
上同时使用这两个效果?