AnimationSet

动画集合

res/anim/animation_in_and_out_from_left.xml

<set xmlns:andro
    android:shareInterpolator="false">
    <translate
        android:duration="1000"
        android:fillAfter="true"
        android:fromXDelta="-100%p"
        android:interpolator="@android:anim/accelerate_interpolator"
        android:toXDelta="0%p"/>
    <set
        android:interpolator="@android:anim/accelerate_interpolator"
        android:startOffset="1000">
        <translate
            android:duration="1000"
            android:fromXDelta="0%p"
            android:interpolator="@android:anim/accelerate_interpolator"
            android:toXDelta="-100%p"/>
    </set>
</set>

  调用

        Animation leftAnimation = AnimationUtils.loadAnimation(this, R.anim.animation_in_and_out_from_left);
        mLeftImageView.setAnimation(leftAnimation);
        mLeftImageView.startAnimation(leftAnimation);

  但是在魅族手机上播放不了,不知道哪位大神知道,还望赐教。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-09-21
  • 2022-01-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-19
  • 2021-12-10
  • 2021-05-20
  • 2022-12-23
  • 2021-10-19
相关资源
相似解决方案