zoukankan      html  css  js  c++  java
  • 【Android】xml实现简单动画集合

    AnimationSet

    动画集合

    res/anim/animation_in_and_out_from_left.xml

    <set xmlns:android="http://schemas.android.com/apk/res/android"
        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);
    

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

  • 相关阅读:
    开发基于键值对形式的语言管理器LauguageManager
    基于Json(键值对)配置文件的配置管理器
    Unity换装效果
    技能冷却效果的制作
    c#中的反射
    委托和事件的区别
    字典
    有序列表
    链表

  • 原文地址:https://www.cnblogs.com/ryq2014/p/6841236.html
Copyright © 2011-2022 走看看