欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

Animatable API介绍

发布时间:2025/4/16 编程问答 40 豆豆
生活随笔 收集整理的这篇文章主要介绍了 Animatable API介绍 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

public interface Animatable 

android.graphics.drawable.Animatable
Known indirect subclasses   非直接子类

Animatable2                       Abstract class that drawables supporting animations and callbacks should extend. 

                                             支持动画和回调的drawables应该继承的类


AnimatedImageDrawable     Drawable for drawing animated images (like GIF). 

                                               绘制动图的drawable  (比如:GIF)


AnimatedVectorDrawable    This class animates properties of a VectorDrawable with animations defined                                                                                                   using ObjectAnimatoror AnimatorSet

                                                这个类激活VectorDrawable的属性,VectorDrawable使用ObjectAnimator或者 AnimatorSet定义动画


AnimationDrawable     An object used to create frame-by-frame animations, defined by a series of Drawable objects, which                                                       can be used as a View object's background. 


                                              用于创建一帧一帧的动画的对象,由一系列Drawables定义而成,用于View对象的背景。


Interface that drawables supporting animations should implement.

支持动画的drawables 应该实现的接口


Summary  总结

Public methods

abstract booleanisRunning()

Indicates whether the animation is running.

表示动画是否正在运行

abstract voidstart()

Starts the drawable's animation.

开启drawable的动画

abstract voidstop()

Stops the drawable's animation.

停止drawable的动画


Public methods

isRunning

added in API level 4boolean isRunning ()

Indicates whether the animation is running.

Returns
booleanTrue if the animation is running, false otherwise.
True 如果动画正在执行的话,否则为false

start

added in API level 4void start ()

Starts the drawable's animation.

开启drawables的动画

stop

added in API level 4void stop ()

Stops the drawable's animation.

停止drawables的动画



总结

以上是生活随笔为你收集整理的Animatable API介绍的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。