zoukankan      html  css  js  c++  java
  • animated-rotated动画加载

    摘自https://blog.csdn.net/yinsujun11/article/details/49931141

    <?xml version="1.0" encoding="utf-8"?>
    <animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="200"
    android:fromDegrees="0.0"
    android:interpolator="@android:anim/accelerate_decelerate_interpolator"
    android:pivotX="50.0%"
    android:pivotY="50.0%"
    android:repeatMode="restart"
    android:toDegrees="360.0" 
    android:drawable="@mipmap/pull_icon">
    </animated-rotate>

    duration:动画开始到结束的执行时间

    fromDegrees: 设置动画开始时的角度

    toDegrees:设置动画结束时的旋转角度

    pivotX : 设置动画相对于控件的 x 坐标的位置

    pivotY:设置动画相对于控件的 y 坐标的位置

    repeatMode:

    动画的进度使用 Interpolator 控制。Interpolator 定义了动画的变化速度,可以实现匀速、正加速、负加速、无规则变加速等。Interpolator 是基类,封装了所有 Interpolator 的共同方法,它只有一个方法,即 getInterpolation (float input),该方法 maps a point on the timeline to a multiplier to be applied to the transformations of an animation。Android 提供了几个 Interpolator 子类,实现了不同的速度曲线,如下:

    AccelerateDecelerateInterpolator 在动画开始与介绍的地方速率改变比较慢,在中间的时侯加速

    AccelerateInterpolator 在动画开始的地方速率改变比较慢,然后开始加速

    CycleInterpolator 动画循环播放特定的次数,速率改变沿着正弦曲线

    DecelerateInterpolator 在动画开始的地方速率改变比较慢,然后开始减速

    LinearInterpolator 在动画的以均匀的速率改变

    对于 LinearInterpolator ,变化率是个常数,即 f (x) = x.
    public float getInterpolation(float input) {
    return input;
    }

  • 相关阅读:
    asp数据查询及数据筛选
    数据链接(无源方式)
    HTML5 Input 类型
    PS调出米黄色复古柔和外景人物照
    PS调出清新淡雅外景女生背影照
    PS提亮户外儿童照
    PS制作恐怖逼真滴血文字
    ps昏暗室内照片调成暖色光亮效果
    PS滤镜制作下雨照片特效
    PS滤镜给城市夜空照片添加满天星
  • 原文地址:https://www.cnblogs.com/yfafa/p/9077270.html
Copyright © 2011-2022 走看看