简体   繁体   中英

how to Ceate ObjectAnimator animation to mp4 Video?

I am trying to Create ObjectAnimator animation to m4 video .
Anybody give me solution ?

ObjectAnimator animation CODE :

 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();
}

You can not create ObjectAnimator to video. You can only animate View that will used to show the video.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM