# DrawerArrowDrawable

Artifact: [androidx.appcompat:appcompat](https://developer.android.com/jetpack/androidx/releases/appcompat) [View Source](https://cs.android.com/search?q=file:androidx/appcompat/graphics/drawable/DrawerArrowDrawable.java+class:androidx.appcompat.graphics.drawable.DrawerArrowDrawable) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

*** ** * ** ***


```
public class DrawerArrowDrawable extends Drawable
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | [androidx.appcompat.graphics.drawable.DrawerArrowDrawable](https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable) |

*** ** * ** ***

A drawable that can draw a "Drawer hamburger" menu or an arrow and animate between them.

The progress between the two states is controlled via `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setProgress(float)`.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_END() = 3` Direction to make the arrow point to the end. |
| `static final int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_LEFT() = 0` Direction to make the arrow point towards the left. |
| `static final int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_RIGHT() = 1` Direction to make the arrow point towards the right. |
| `static final int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_START() = 2` Direction to make the arrow point towards the start. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#DrawerArrowDrawable(android.content.Context)(https://developer.android.com/reference/android/content/Context.html context)` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#draw(android.graphics.Canvas)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Canvas.html canvas)` |
| `float` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getArrowHeadLength()()` Returns the length of the arrow head (from tip to edge, perpendicular to the shaft), in pixels. |
| `float` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getArrowShaftLength()()` Returns the arrow shaft length in pixels. |
| `float` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getBarLength()()` The length of the bars when they are parallel to each other. |
| `float` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getBarThickness()()` Returns the thickness (stroke width) of the bars. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getColor()()` Returns the color of the drawable. |
| `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getDirection()()` Returns the arrow direction. |
| `float` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getGapSize()()` Returns the max gap between the bars when they are parallel to each other. |
| `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getIntrinsicHeight()()` |
| `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getIntrinsicWidth()()` |
| `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getOpacity()()` **This method is deprecated.** |
| `final https://developer.android.com/reference/android/graphics/Paint.html` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getPaint()()` Returns the paint instance used for all drawing. |
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, to = 1.0) float` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getProgress()()` Returns the current progress of the arrow. |
| `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#isSpinEnabled()()` Returns whether the bars should rotate or not during the transition. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setAlpha(int)(int alpha)` |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setArrowHeadLength(float)(float length)` Sets the length of the arrow head (from tip to edge, perpendicular to the shaft). |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setArrowShaftLength(float)(float length)` Sets the arrow shaft length. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setBarLength(float)(float length)` Sets the length of the bars when they are parallel to each other. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setBarThickness(float)(float width)` Sets the thickness (stroke size) for the bars. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setColor(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int color)` Sets the color of the drawable. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setColorFilter(android.graphics.ColorFilter)(https://developer.android.com/reference/android/graphics/ColorFilter.html colorFilter)` |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setDirection(int)(int direction)` Set the arrow direction. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setGapSize(float)(float gap)` Sets the max gap between the bars when they are parallel to each other. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setProgress(float)(@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, to = 1.0) float progress)` Set the progress of the arrow. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setSpinEnabled(boolean)(boolean enabled)` Returns whether the bars should rotate or not during the transition. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setVerticalMirror(boolean)(boolean verticalMirror)` If set, canvas is flipped when progress reached to end and going back to start. |

| ### Inherited methods |
|---|
| From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) |---|---| | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme.html t)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter()()` | | `final https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds()()` | | `final void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromPath(java.lang.String)(https://developer.android.com/reference/java/lang/String.html pathName)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String)( https://developer.android.com/reference/android/content/res/Resources.html res, https://developer.android.com/reference/android/util/TypedValue.html value, https://developer.android.com/reference/java/io/InputStream.html is, https://developer.android.com/reference/java/lang/String.html srcName )` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromStream(java.io.InputStream, java.lang.String)(https://developer.android.com/reference/java/io/InputStream.html is, https://developer.android.com/reference/java/lang/String.html srcName)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser)(https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)( https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, https://developer.android.com/reference/android/util/AttributeSet.html attrs )` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getAlpha()()` | | `final https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getBounds()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCallback()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getChangingConfigurations()()` | | `https://developer.android.com/reference/android/graphics/ColorFilter.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getColorFilter()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getConstantState()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCurrent()()` | | `https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getDirtyBounds()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html outRect)` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection()()` | | `final int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLevel()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumHeight()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumWidth()()` | | `https://developer.android.com/reference/android/graphics/Insets.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpticalInsets()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline)(https://developer.android.com/reference/android/graphics/Outline.html outline)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html padding)` | | `int[]` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getState()()` | | `https://developer.android.com/reference/android/graphics/Region.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getTransparentRegion()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)(https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, https://developer.android.com/reference/android/util/AttributeSet.html attrs)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isFilterBitmap()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isProjected()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isStateful()()` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isVisible()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#mutate()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onBoundsChange(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int)(int layoutDirection)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int)(int level)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[])(int[] state)` | | `static int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#resolveOpacity(int, int)(int op1, int op2)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long)(https://developer.android.com/reference/java/lang/Runnable.html what, long when)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAutoMirrored(boolean)(boolean mirrored)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `final void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setCallback(android.graphics.drawable.Drawable.Callback)(https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html cb)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setChangingConfigurations(int)(int configs)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean)(boolean dither)` **This method is deprecated.** | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setFilterBitmap(boolean)(boolean filter)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float)(float x, float y)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int)(int left, int top, int right, int bottom)` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int)(int layoutDirection)` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLevel(int)(int level)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setState(int[])(int[] stateSet)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int)(int tintColor)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode.html blendMode)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList.html tint)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean)(boolean visible, boolean restart)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable.html what)` | |

## Constants

### ARROW_DIRECTION_END

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public static final int ARROW_DIRECTION_END = 3
```

Direction to make the arrow point to the end.

When used in a view with a `https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_RTL()` layout direction, this is the same as `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_LEFT()`, otherwise it is the same as `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_RIGHT()`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setDirection(int)` |   |
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getDirection()` |   |

### ARROW_DIRECTION_LEFT

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public static final int ARROW_DIRECTION_LEFT = 0
```

Direction to make the arrow point towards the left.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setDirection(int)` |   |
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getDirection()` |   |

### ARROW_DIRECTION_RIGHT

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public static final int ARROW_DIRECTION_RIGHT = 1
```

Direction to make the arrow point towards the right.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setDirection(int)` |   |
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getDirection()` |   |

### ARROW_DIRECTION_START

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public static final int ARROW_DIRECTION_START = 2
```

Direction to make the arrow point towards the start.

When used in a view with a `https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_RTL()` layout direction, this is the same as `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_RIGHT()`, otherwise it is the same as `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#ARROW_DIRECTION_LEFT()`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setDirection(int)` |   |
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getDirection()` |   |

## Public constructors

### DrawerArrowDrawable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public DrawerArrowDrawable(Context context)
```

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/content/Context.html context` | used to get the configuration for the drawable from |

## Public methods

### draw

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void draw(@NonNull Canvas canvas)
```

### getArrowHeadLength

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public float getArrowHeadLength()
```

Returns the length of the arrow head (from tip to edge, perpendicular to the shaft), in pixels.

### getArrowShaftLength

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public float getArrowShaftLength()
```

Returns the arrow shaft length in pixels.

### getBarLength

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public float getBarLength()
```

The length of the bars when they are parallel to each other.

### getBarThickness

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public float getBarThickness()
```

Returns the thickness (stroke width) of the bars.

### getColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public @ColorInt int getColor()
```

Returns the color of the drawable.

### getDirection

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public int getDirection()
```

Returns the arrow direction.

### getGapSize

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public float getGapSize()
```

Returns the max gap between the bars when they are parallel to each other.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getGapSize()` |   |

### getIntrinsicHeight

```
public int getIntrinsicHeight()
```

### getIntrinsicWidth

```
public int getIntrinsicWidth()
```

### getOpacity

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public int getOpacity()
```

> [!CAUTION]
> **This method is deprecated.**   

### getPaint

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public final Paint getPaint()
```

Returns the paint instance used for all drawing.

### getProgress

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public @FloatRange(from = 0.0, to = 1.0) float getProgress()
```

Returns the current progress of the arrow.

### isSpinEnabled

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public boolean isSpinEnabled()
```

Returns whether the bars should rotate or not during the transition.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#setSpinEnabled(boolean)` |   |

### setAlpha

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setAlpha(int alpha)
```

### setArrowHeadLength

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setArrowHeadLength(float length)
```

Sets the length of the arrow head (from tip to edge, perpendicular to the shaft).

| Parameters |
|---|---|
| `float length` | the length in pixels |

### setArrowShaftLength

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setArrowShaftLength(float length)
```

Sets the arrow shaft length.

| Parameters |
|---|---|
| `float length` | the length in pixels |

### setBarLength

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setBarLength(float length)
```

Sets the length of the bars when they are parallel to each other.

| Parameters |
|---|---|
| `float length` | the length in pixels |

### setBarThickness

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setBarThickness(float width)
```

Sets the thickness (stroke size) for the bars.

| Parameters |
|---|---|
| `float width` | stroke width in pixels |

### setColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setColor(@ColorInt int color)
```

Sets the color of the drawable.

### setColorFilter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setColorFilter(ColorFilter colorFilter)
```

### setDirection

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setDirection(int direction)
```

Set the arrow direction.

### setGapSize

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setGapSize(float gap)
```

Sets the max gap between the bars when they are parallel to each other.

| Parameters |
|---|---|
| `float gap` | the gap in pixels |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#getGapSize()` |   |

### setProgress

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setProgress(@FloatRange(from = 0.0, to = 1.0) float progress)
```

Set the progress of the arrow.

A value of `0.0` indicates that the arrow should be drawn in its starting position. A value of `1.0` indicates that the arrow should be drawn in its ending position.

### setSpinEnabled

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setSpinEnabled(boolean enabled)
```

Returns whether the bars should rotate or not during the transition.

| Parameters |
|---|---|
| `boolean enabled` | true if the bars should rotate. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawerArrowDrawable#isSpinEnabled()` |   |

### setVerticalMirror

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void setVerticalMirror(boolean verticalMirror)
```

If set, canvas is flipped when progress reached to end and going back to start.