0
我試圖在Android中應用淡入\出過渡。淡入出作品太短,太快在Android
你能告訴我爲什麼我看到衰落只有片刻,然後回到原來的阿爾法?
我已添加setFillAfter(true);
以堅持圖像消失。
我曾嘗試:
animation = android.view.animation.AnimationUtils
.loadAnimation(AppService.getAppContext(),
com.waze.R.anim.fade_out);
animation.setInterpolator(new AccelerateInterpolator());
animation.setFillAfter(true);
boxImage_left.startAnimation(animation);
與此:
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<alpha android:fromAlpha="0.0"
android:toAlpha="1.0"
android:repeatCount="0"
android:duration="500"/>
</set>
也:
AlphaAnimation alpha = new AlphaAnimation(0,1);
alpha.setDuration(600);
animation.setInterpolator(new AccelerateInterpolator());
animation.setFillAfter(true);
vImage_left.startAnimation(alpha);