1. 程式人生 > >Animatable API介紹

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 boolean isRunning()

Indicates whether the animation is running.

表示動畫是否正在執行

abstract void start()

Starts the drawable's animation.

開啟drawable的動畫

abstract void stop()

Stops the drawable's animation.

停止drawable的動畫


Public methods

isRunning

added in  API level 4

   boolean isRunning ()
   

Indicates whether the animation is running.

Returns
boolean True if the animation is running, false otherwise.
True 如果動畫正在執行的話,否則為false

start

added in  API level 4

   void start ()
   

Starts the drawable's animation.

開啟drawables的動畫

stop

added in  API level 4

   void stop ()
   

Stops the drawable's animation.

停止drawables的動畫