com.amap.api.maps.model.animation

## 类 Animation

- java.lang.Object
- - com.amap.api.maps.model.animation.Animation

- 直接已知子类:
    AlphaAnimation, AnimationSet, RotateAnimation, ScaleAnimation, TranslateAnimation

      public abstract class Animation
      extends java.lang.Object

  动画,可用于支持动画的覆盖物
  使用方法如同Android系统自带的`Animation`
  Animation, can be used for overlays that support animation
  Usage is similar to the built-in `Animation` in Android
  从以下版本开始:
    4.0.0

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static interface` | `Animation.AnimationListener` 动画监听，包含动画开始和结束时的回调 Animation listener, includes callbacks for animation start and end

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected java.lang.String` | `animationType` jni使用 For JNI use
    `static int` | `FILL_MODE_BACKWARDS` 动画执行后保持在第一帧 Stay on the first frame after animation execution
    `static int` | `FILL_MODE_FORWARDS` 动画执行后保持在最后一帧 Stay on the last frame after animation execution
    `static int` | `INFINITE` 无限期地重复动画.
    `static int` | `RESTART` 动画结束后从头播放，最大重复次数受`Animation.setRepeatCount(int)` 限制 Play from the beginning after the animation ends, with the maximum repeat count limited by `Animation.setRepeatCount(int)`
    `static int` | `REVERSE` 动画结束后从尾倒放，最大重复次数受`Animation.setRepeatCount(int)` 限制 Play in reverse from the end after the animation ends, with the maximum repeat count limited by `Animation.setRepeatCount(int)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getFillMode()` 获取动画执行完成后的状态 Get the state after the animation completes
    `int` | `getRepeatCount()` 获取动画重复执行的次数,默认为0。
    `int` | `getRepeatMode()` 重复执行的模式.
    `void` | `setAnimationListener(Animation.AnimationListener listener)` 设置动画监听器 Set animation listener
    `void` | `setDuration(long duration)` 设置动画持续时间,如果设置为负数,会修正为0 Set animation duration, if set to a negative value, it will be corrected to 0
    `void` | `setFillMode(int fillMode)` 设置动画执行完成后的状态 Set the state after the animation completes
    `void` | `setInterpolator(android.view.animation.Interpolator interpolator)` 设置插值器,默认是线性插值器 Set interpolator, default is linear interpolator
    `void` | `setRepeatCount(int repeatCount)` 设置动画重复执行的次数,默认为0 Set the number of times the animation repeats, default is 0
    `void` | `setRepeatMode(int repeatMode)` 重复执行的模式，默认从前往后执行 Repeat mode, default is forward execution

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### FILL_MODE_FORWARDS

          public static final int FILL_MODE_FORWARDS

      动画执行后保持在最后一帧
      Stay on the last frame after animation execution
      从以下版本开始:
        6.7.0
      另请参阅:
        常量字段值

    - #### FILL_MODE_BACKWARDS

          public static final int FILL_MODE_BACKWARDS

      动画执行后保持在第一帧
      Stay on the first frame after animation execution
      从以下版本开始:
        6.7.0
      另请参阅:
        常量字段值

    - #### INFINITE

          public static final int INFINITE

      无限期地重复动画.
      Repeat the animation indefinitely.
      从以下版本开始:
        6.7.0
      另请参阅:
        常量字段值

    - #### RESTART

          public static final int RESTART

      动画结束后从头播放，最大重复次数受`Animation.setRepeatCount(int)` 限制
      Play from the beginning after the animation ends, with the maximum repeat count limited by `Animation.setRepeatCount(int)`
      从以下版本开始:
        6.7.0
      另请参阅:
        常量字段值

    - #### REVERSE

          public static final int REVERSE

      动画结束后从尾倒放，最大重复次数受`Animation.setRepeatCount(int)` 限制
      Play in reverse from the end after the animation ends, with the maximum repeat count limited by `Animation.setRepeatCount(int)`
      从以下版本开始:
        6.7.0
      另请参阅:
        常量字段值

    - #### animationType

          protected java.lang.String animationType

      jni使用
      For JNI use

  - ### 方法详细资料

    - #### setAnimationListener

          public void setAnimationListener(Animation.AnimationListener listener)

      设置动画监听器
      Set animation listener
      参数:
        `listener` - 动画监听
        Animation listener
      从以下版本开始:
        4.0.0

    - #### setDuration

          public void setDuration(long duration)

      设置动画持续时间,如果设置为负数,会修正为0
      Set animation duration, if set to a negative value, it will be corrected to 0
      参数:
        `duration` - 按毫秒计算时间
        Time is calculated in milliseconds
      从以下版本开始:
        4.0.0

    - #### setInterpolator

          public void setInterpolator(android.view.animation.Interpolator interpolator)

      设置插值器,默认是线性插值器
      Set interpolator, default is linear interpolator
      参数:
        `interpolator` - 插值器
        Interpolator
      从以下版本开始:
        4.0.0

    - #### setFillMode

          public void setFillMode(int fillMode)

      设置动画执行完成后的状态
      Set the state after the animation completes
      参数:
        `fillMode` - 默认为保持最后一帧 `Animation.FILL_MODE_FORWARDS`，缩放动画默认保持第一帧
        Default is to stay on the last frame `Animation.FILL_MODE_FORWARDS`, scale animation stays on the first frame by default
      从以下版本开始:
        6.7.0

    - #### getFillMode

          public int getFillMode()

      获取动画执行完成后的状态
      Get the state after the animation completes
      返回:
        默认为保持最后一帧 `Animation.FILL_MODE_FORWARDS`，缩放动画默认保持第一帧
        Default is to stay on the last frame `Animation.FILL_MODE_FORWARDS`, scale animation stays on the first frame by default
      从以下版本开始:
        6.7.0

    - #### setRepeatCount

          public void setRepeatCount(int repeatCount)

      设置动画重复执行的次数,默认为0
      Set the number of times the animation repeats, default is 0
      参数:
        `repeatCount` - 动画重复执行的次数，默认不会重复执行
        Number of times the animation repeats, by default it does not repeat
      从以下版本开始:
        6.7.0

    - #### setRepeatMode

          public void setRepeatMode(int repeatMode)

      重复执行的模式，默认从前往后执行
      Repeat mode, default is forward execution
      参数:
        `repeatMode` - `Animation.RESTART` or `Animation.REVERSE`
      从以下版本开始:
        6.7.0

    - #### getRepeatMode

          public int getRepeatMode()

      重复执行的模式.
      Repeat mode.
      返回:
        可以是 `Animation.REVERSE` 或者 `Animation.RESTART`
        Can be `Animation.REVERSE` or `Animation.RESTART`
      从以下版本开始:
        6.7.0

    - #### getRepeatCount

          public int getRepeatCount()

      获取动画重复执行的次数,默认为0。
      Get the number of times the animation repeats, default is 0.
      返回:
        动画重复执行的次数, 或者 `Animation.INFINITE`
        Number of times the animation repeats, or `Animation.INFINITE`
      从以下版本开始:
        6.7.0