public class

AutoRotateDrawable

extends ForwardingDrawable
implements CloneableDrawable Runnable
java.lang.Object
   ↳ android.graphics.drawable.Drawable
     ↳ com.facebook.drawee.drawable.ForwardingDrawable
       ↳ com.facebook.drawee.drawable.AutoRotateDrawable

Class Overview

Drawable that automatically rotates underlying drawable.

Summary

[Expand]
Inherited Fields
From class com.facebook.drawee.drawable.ForwardingDrawable
Public Constructors
AutoRotateDrawable(Drawable drawable, int interval)
Creates a new AutoRotateDrawable with given underlying drawable, interval and a clockwise rotation.
AutoRotateDrawable(Drawable drawable, int interval, boolean clockwise)
Creates a new AutoRotateDrawable with given underlying drawable and interval.
Public Methods
AutoRotateDrawable cloneDrawable()
Creates a copy of the drawable.
void draw(Canvas canvas)
void reset()
Resets to the initial state.
void run()
void setClockwise(boolean clockwise)
Define whether the rotation is clockwise or not.
[Expand]
Inherited Methods
From class com.facebook.drawee.drawable.ForwardingDrawable
From class android.graphics.drawable.Drawable
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface com.facebook.drawee.drawable.CloneableDrawable
From interface com.facebook.drawee.drawable.DrawableParent
From interface com.facebook.drawee.drawable.TransformAwareDrawable
From interface com.facebook.drawee.drawable.TransformCallback
From interface java.lang.Runnable

Public Constructors

public AutoRotateDrawable (Drawable drawable, int interval)

Creates a new AutoRotateDrawable with given underlying drawable, interval and a clockwise rotation.

Parameters
drawable underlying drawable to apply the rotation to
interval duration in milliseconds of one complete rotation

public AutoRotateDrawable (Drawable drawable, int interval, boolean clockwise)

Creates a new AutoRotateDrawable with given underlying drawable and interval.

Parameters
drawable underlying drawable to apply the rotation to
interval duration in milliseconds of one complete rotation
clockwise defines whether the rotation is clockwise or not

Public Methods

public AutoRotateDrawable cloneDrawable ()

Creates a copy of the drawable.

Returns
  • the drawable copy

public void draw (Canvas canvas)

public void reset ()

Resets to the initial state.

public void run ()

public void setClockwise (boolean clockwise)

Define whether the rotation is clockwise or not. By default is the rotation clockwise.