1
我有兩個不同的動畫:Android AnimationSet是否會覆蓋子動畫的持續時間和插值器?
AlphaAnimation alphaAnimation = new AlphaAnimation(0f,1f);
alphaAnimation.setDuration(1000);
alphaAnimation.setInterpolator(new AccelerateInterpolator());
ScaleAnimation scaleAnimation = new ScaleAnimation(1f,2f,1f,2f);
scaleAnimation.setDuration(3000);
scaleAnimation.setInterpolator(new DecelerateInterpolator());
,我需要同步播放這動畫。
AnimationSet set = new AnimationSet(false);
set.addAnimation(alphaAnimation);
set.addAnimation(scaleAnimation);
set.setDuration(5000);
startAnimation(set);
而且我有一個問題。我在每個動畫上設置了一些值,例如插值器和持續時間。動畫集影響(覆蓋)插值器值,當我設置它AnimationSet?這個問題也給持續時間值。