android.support.v4.graphics.drawable
Class DrawableCompat

java.lang.Object
  extended by android.support.v4.graphics.drawable.DrawableCompat

public class DrawableCompat
extends java.lang.Object

Helper for accessing features in Drawable introduced after API level 4 in a backwards compatible fashion.


Constructor Summary
DrawableCompat()
           
 
Method Summary
static boolean isAutoMirrored(android.graphics.drawable.Drawable drawable)
          Tells if this Drawable will be automatically mirrored when its layout direction is RTL right-to-left.
static void jumpToCurrentState(android.graphics.drawable.Drawable drawable)
          Call Drawable.jumpToCurrentState().
static void setAutoMirrored(android.graphics.drawable.Drawable drawable, boolean mirrored)
          Set whether this Drawable is automatically mirrored when its layout direction is RTL (right-to left).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableCompat

public DrawableCompat()
Method Detail

jumpToCurrentState

public static void jumpToCurrentState(android.graphics.drawable.Drawable drawable)
Call Drawable.jumpToCurrentState().

If running on a pre-android.os.Build.VERSION_CODES#HONEYCOMB device this method does nothing.

Parameters:
drawable - The Drawable against which to invoke the method.

setAutoMirrored

public static void setAutoMirrored(android.graphics.drawable.Drawable drawable,
                                   boolean mirrored)
Set whether this Drawable is automatically mirrored when its layout direction is RTL (right-to left). See android.util.LayoutDirection.

If running on a pre-android.os.Build.VERSION_CODES#KITKAT device this method does nothing.

Parameters:
drawable - The Drawable against which to invoke the method.
mirrored - Set to true if the Drawable should be mirrored, false if not.

isAutoMirrored

public static boolean isAutoMirrored(android.graphics.drawable.Drawable drawable)
Tells if this Drawable will be automatically mirrored when its layout direction is RTL right-to-left. See android.util.LayoutDirection.

If running on a pre-android.os.Build.VERSION_CODES#KITKAT device this method returns false.

Parameters:
drawable - The Drawable against which to invoke the method.
Returns:
boolean Returns true if this Drawable will be automatically mirrored.