我正在尝试为m4视频创建ObjectAnimator动画。
有人给我解决方案吗?
ObjectAnimator动画代码:
public void animation(){
ObjectAnimator fadeOut = ObjectAnimator.ofFloat(aniView, "alpha", 0f);
fadeOut.setDuration(1000);
ObjectAnimator mover = ObjectAnimator.ofFloat(aniView, "translationY", -700f, 0f);
mover.setDuration(1000);
ObjectAnimator fadeIn = ObjectAnimator.ofFloat(aniView, "alpha", 0.8f, 1f);
fadeIn.setDuration(1000);
AnimatorSet animatorSet = new AnimatorSet();
// animatorSet.play(mover).with(fadeIn).after(fadeOut);
animatorSet.play(fadeOut).after(mover).with(fadeIn);
animatorSet.start();
}
答案 0 :(得分:0)
您无法为视频创建ObjectAnimator。您只能为用于显示视频的View
制作动画。