# ActionBarDrawerToggle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1  
Summary:[Nested Classes](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#nestedclasses)\|[Ctors](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#)  

# ActionBarDrawerToggle

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
ActionBarDrawerToggle
`  
`

extends Object


``


implements

`[DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)`


`

|---|----------------------------------------------|
| java.lang.Object                                ||
| ↳ | android.support.v7.app.ActionBarDrawerToggle |

<br />

*** ** * ** ***

This class provides a handy way to tie together the functionality of[DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)and the framework`ActionBar`to implement the recommended design for navigation drawers.

To use`ActionBarDrawerToggle`, create one in your Activity and call through to the following methods corresponding to your Activity callbacks:

- [onConfigurationChanged](https://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration))
- [onOptionsItemSelected](https://developer.android.com/reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem))

Call[syncState()](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#syncState())from your`Activity`'s[onPostCreate](https://developer.android.com/reference/android/app/Activity.html#onPostCreate(android.os.Bundle))to synchronize the indicator with the state of the linked DrawerLayout after`onRestoreInstanceState`has occurred.

`ActionBarDrawerToggle`can be used directly as a[DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener), or if you are already providing your own listener, call through to each of the listener methods from your own.

You can customize the the animated toggle by defining the[drawerArrowStyle](https://developer.android.com/reference/android/support/v7/appcompat/R.styleable#DrawerArrowToggle)in your ActionBar theme.

## Summary

|                                                                                                                                                                             ### Nested classes                                                                                                                                                                              ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate) <br />                                                                                                                                                                                                                        |
| ` interface` | [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.DelegateProvider) Allows an implementing Activity to return an[ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate)to use with ActionBarDrawerToggle. |

|                                                                                                                                                                                                                                                                                                                               ### Public constructors                                                                                                                                                                                                                                                                                                                               ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#ActionBarDrawerToggle(android.app.Activity, android.support.v4.widget.DrawerLayout, int, int))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` activity, `[DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)` drawerLayout, int openDrawerContentDescRes, int closeDrawerContentDescRes) ` Construct a new ActionBarDrawerToggle.                                                                                                                                                   |
| ` `[ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#ActionBarDrawerToggle(android.app.Activity, android.support.v4.widget.DrawerLayout, android.support.v7.widget.Toolbar, int, int))`(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` activity, `[DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)` drawerLayout, `[Toolbar](https://developer.android.com/reference/android/support/v7/widget/Toolbar)` toolbar, int openDrawerContentDescRes, int closeDrawerContentDescRes) ` Construct a new ActionBarDrawerToggle with a Toolbar. |

|                                                                                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                                                                                              ||
|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[DrawerArrowDrawable](https://developer.android.com/reference/android/support/v7/graphics/drawable/DrawerArrowDrawable) | ` `[getDrawerArrowDrawable](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#getDrawerArrowDrawable())`() `                                                                                                                                                                                                                                                                                                                                                                 |
| ` `[View.OnClickListener](https://developer.android.com/reference/android/view/View.OnClickListener.html)                  | ` `[getToolbarNavigationClickListener](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#getToolbarNavigationClickListener())`() ` Returns the fallback listener for Navigation icon click events.                                                                                                                                                                                                                                                                           |
| ` boolean`                                                                                                                 | ` `[isDrawerIndicatorEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#isDrawerIndicatorEnabled())`() `                                                                                                                                                                                                                                                                                                                                                             |
| ` boolean`                                                                                                                 | ` `[isDrawerSlideAnimationEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#isDrawerSlideAnimationEnabled())`() `                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                                    | ` `[onConfigurationChanged](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#onConfigurationChanged(android.content.res.Configuration))`(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` newConfig) ` This method should always be called by your`Activity`'s[onConfigurationChanged](https://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration))method. |
| ` void`                                                                                                                    | ` `[onDrawerClosed](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#onDrawerClosed(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` drawerView) ` [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method.                                                                                                                                |
| ` void`                                                                                                                    | ` `[onDrawerOpened](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#onDrawerOpened(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` drawerView) ` [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method.                                                                                                                                |
| ` void`                                                                                                                    | ` `[onDrawerSlide](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#onDrawerSlide(android.view.View, float))`(`[View](https://developer.android.com/reference/android/view/View.html)` drawerView, float slideOffset) ` [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method.                                                                                                        |
| ` void`                                                                                                                    | ` `[onDrawerStateChanged](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#onDrawerStateChanged(int))`(int newState) ` [DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method.                                                                                                                                                                                                         |
| ` boolean`                                                                                                                 | ` `[onOptionsItemSelected](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#onOptionsItemSelected(android.view.MenuItem))`(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` item) ` This method should be called by your`Activity`'s[onOptionsItemSelected](https://developer.android.com/reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem))method.                                                          |
| ` void`                                                                                                                    | ` `[setDrawerArrowDrawable](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerArrowDrawable(android.support.v7.graphics.drawable.DrawerArrowDrawable))`(`[DrawerArrowDrawable](https://developer.android.com/reference/android/support/v7/graphics/drawable/DrawerArrowDrawable)` drawable) ` Sets the DrawerArrowDrawable that should be shown by this ActionBarDrawerToggle.                                                                                      |
| ` void`                                                                                                                    | ` `[setDrawerIndicatorEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean))`(boolean enable) ` Enable or disable the drawer indicator.                                                                                                                                                                                                                                                                                              |
| ` void`                                                                                                                    | ` `[setDrawerSlideAnimationEnabled](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerSlideAnimationEnabled(boolean))`(boolean enabled) ` Specifies whether the drawer arrow should animate when the drawer position changes.                                                                                                                                                                                                                                       |
| ` void`                                                                                                                    | ` `[setHomeAsUpIndicator](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setHomeAsUpIndicator(android.graphics.drawable.Drawable))`(`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` indicator) ` Set the up indicator to display when the drawer indicator is not enabled.                                                                                                                                                  |
| ` void`                                                                                                                    | ` `[setHomeAsUpIndicator](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setHomeAsUpIndicator(int))`(int resId) ` Set the up indicator to display when the drawer indicator is not enabled.                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                    | ` `[setToolbarNavigationClickListener](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setToolbarNavigationClickListener(android.view.View.OnClickListener))`(`[View.OnClickListener](https://developer.android.com/reference/android/view/View.OnClickListener.html)` onToolbarNavigationClickListener) ` When DrawerToggle is constructed with a Toolbar, it sets the click listener on the Navigation icon.                                                             |
| ` void`                                                                                                                    | ` `[syncState](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#syncState())`() ` Synchronize the state of the drawer indicator/affordance with the linked DrawerLayout.                                                                                                                                                                                                                                                                                                    |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#)From interface` `[android.support.v4.widget.DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[onDrawerClosed](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener#onDrawerClosed(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` drawerView) ` Called when a drawer has settled in a completely closed state.   | | ` abstract void` | ` `[onDrawerOpened](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener#onDrawerOpened(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` drawerView) ` Called when a drawer has settled in a completely open state.     | | ` abstract void` | ` `[onDrawerSlide](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener#onDrawerSlide(android.view.View, float))`(`[View](https://developer.android.com/reference/android/view/View.html)` drawerView, float slideOffset) ` Called when a drawer's position changes. | | ` abstract void` | ` `[onDrawerStateChanged](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener#onDrawerStateChanged(int))`(int newState) ` Called when the drawer motion state changes.                                                                                              | ||

## Public constructors

### ActionBarDrawerToggle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBarDrawerToggle (Activity activity, 
                DrawerLayout drawerLayout, 
                int openDrawerContentDescRes, 
                int closeDrawerContentDescRes)
```

Construct a new ActionBarDrawerToggle.

The given[Activity](https://developer.android.com/reference/android/app/Activity.html)will be linked to the specified[DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)and its Actionbar's Up button will be set to a custom drawable.

This drawable shows a Hamburger icon when drawer is closed and an arrow when drawer is open. It animates between these two states as the drawer opens.

String resources must be provided to describe the open/close drawer actions for accessibility services.

<br />

<br />

|                                                      Parameters                                                      ||
|-----------------------------|-----------------------------------------------------------------------------------------|
| `activity`                  | `Activity`: The Activity hosting the drawer. Should have an ActionBar. <br />           |
| `drawerLayout`              | `DrawerLayout`: The DrawerLayout to link to the given Activity's ActionBar <br />       |
| `openDrawerContentDescRes`  | `int`: A String resource to describe the "open drawer" action for accessibility <br />  |
| `closeDrawerContentDescRes` | `int`: A String resource to describe the "close drawer" action for accessibility <br /> |

### ActionBarDrawerToggle

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ActionBarDrawerToggle (Activity activity, 
                DrawerLayout drawerLayout, 
                Toolbar toolbar, 
                int openDrawerContentDescRes, 
                int closeDrawerContentDescRes)
```

Construct a new ActionBarDrawerToggle with a Toolbar.

The given[Activity](https://developer.android.com/reference/android/app/Activity.html)will be linked to the specified[DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout)and the Toolbar's navigation icon will be set to a custom drawable. Using this constructor will set Toolbar's navigation click listener to toggle the drawer when it is clicked.

This drawable shows a Hamburger icon when drawer is closed and an arrow when drawer is open. It animates between these two states as the drawer opens.

String resources must be provided to describe the open/close drawer actions for accessibility services.

Please use[ActionBarDrawerToggle(Activity, DrawerLayout, int, int)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#ActionBarDrawerToggle(android.app.Activity, android.support.v4.widget.DrawerLayout, int, int))if you are setting the Toolbar as the ActionBar of your activity.

<br />

|                                                      Parameters                                                      ||
|-----------------------------|-----------------------------------------------------------------------------------------|
| `activity`                  | `Activity`: The Activity hosting the drawer. <br />                                     |
| `drawerLayout`              | `DrawerLayout`: The DrawerLayout to link to the given Activity's ActionBar <br />       |
| `toolbar`                   | `Toolbar`: The toolbar to use if you have an independent Toolbar. <br />                |
| `openDrawerContentDescRes`  | `int`: A String resource to describe the "open drawer" action for accessibility <br />  |
| `closeDrawerContentDescRes` | `int`: A String resource to describe the "close drawer" action for accessibility <br /> |

## Public methods

### getDrawerArrowDrawable

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
DrawerArrowDrawable getDrawerArrowDrawable ()
```

<br />

<br />

|                                                                                                  Returns                                                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
| [DrawerArrowDrawable](https://developer.android.com/reference/android/support/v7/graphics/drawable/DrawerArrowDrawable) | DrawerArrowDrawable that is currently shown by the ActionBarDrawerToggle. <br /> |

### getToolbarNavigationClickListener

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
View.OnClickListener getToolbarNavigationClickListener ()
```

Returns the fallback listener for Navigation icon click events.

<br />

|                                                                                                         Returns                                                                                                          ||
|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [View.OnClickListener](https://developer.android.com/reference/android/view/View.OnClickListener.html) | The click listener which receives Navigation click events from Toolbar when drawer indicator is disabled. <br /> |

**See also:**

- [setToolbarNavigationClickListener(android.view.View.OnClickListener)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setToolbarNavigationClickListener(android.view.View.OnClickListener))
- [setDrawerIndicatorEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean))
- [isDrawerIndicatorEnabled()](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#isDrawerIndicatorEnabled())  

### isDrawerIndicatorEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isDrawerIndicatorEnabled ()
```

<br />

<br />

|                                       Returns                                       ||
|-----------|--------------------------------------------------------------------------|
| `boolean` | true if the enhanced drawer indicator is enabled, false otherwise <br /> |

**See also:**

- [setDrawerIndicatorEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean))  

### isDrawerSlideAnimationEnabled

added in[version 25.4.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isDrawerSlideAnimationEnabled ()
```

<br />

<br />

|                             Returns                             ||
|-----------|------------------------------------------------------|
| `boolean` | whether the drawer slide animation is enabled <br /> |

### onConfigurationChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onConfigurationChanged (Configuration newConfig)
```

This method should always be called by your`Activity`'s[onConfigurationChanged](https://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration))method.

<br />

|                         Parameters                         ||
|-------------|-----------------------------------------------|
| `newConfig` | `Configuration`: The new configuration <br /> |

### onDrawerClosed

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onDrawerClosed (View drawerView)
```

[DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method. If you do not use your ActionBarDrawerToggle instance directly as your DrawerLayout's listener, you should call through to this method from your own listener object.

<br />

|                         Parameters                          ||
|--------------|-----------------------------------------------|
| `drawerView` | `View`: Drawer view that is now closed <br /> |

### onDrawerOpened

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onDrawerOpened (View drawerView)
```

[DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method. If you do not use your ActionBarDrawerToggle instance directly as your DrawerLayout's listener, you should call through to this method from your own listener object.

<br />

|                        Parameters                         ||
|--------------|---------------------------------------------|
| `drawerView` | `View`: Drawer view that is now open <br /> |

### onDrawerSlide

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onDrawerSlide (View drawerView, 
                float slideOffset)
```

[DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method. If you do not use your ActionBarDrawerToggle instance directly as your DrawerLayout's listener, you should call through to this method from your own listener object.

<br />

|                                       Parameters                                        ||
|---------------|--------------------------------------------------------------------------|
| `drawerView`  | `View`: The child view that was moved <br />                             |
| `slideOffset` | `float`: The new offset of this drawer within its range, from 0-1 <br /> |

### onDrawerStateChanged

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onDrawerStateChanged (int newState)
```

[DrawerLayout.DrawerListener](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener)callback method. If you do not use your ActionBarDrawerToggle instance directly as your DrawerLayout's listener, you should call through to this method from your own listener object.

<br />

|                      Parameters                       ||
|------------|-------------------------------------------|
| `newState` | `int`: The new drawer motion state <br /> |

### onOptionsItemSelected

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onOptionsItemSelected (MenuItem item)
```

This method should be called by your`Activity`'s[onOptionsItemSelected](https://developer.android.com/reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem))method. If it returns true, your`onOptionsItemSelected`method should return true and skip further processing.

<br />

|                                      Parameters                                      ||
|--------|------------------------------------------------------------------------------|
| `item` | `MenuItem`: the MenuItem instance representing the selected menu item <br /> |

|                                         Returns                                         ||
|-----------|------------------------------------------------------------------------------|
| `boolean` | true if the event was handled and further processing should not occur <br /> |

### setDrawerArrowDrawable

added in[version 25.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDrawerArrowDrawable (DrawerArrowDrawable drawable)
```

Sets the DrawerArrowDrawable that should be shown by this ActionBarDrawerToggle.

<br />

|                                                    Parameters                                                    ||
|------------|------------------------------------------------------------------------------------------------------|
| `drawable` | `DrawerArrowDrawable`: DrawerArrowDrawable that should be shown by this ActionBarDrawerToggle <br /> |

### setDrawerIndicatorEnabled

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDrawerIndicatorEnabled (boolean enable)
```

Enable or disable the drawer indicator. The indicator defaults to enabled.

When the indicator is disabled, the`ActionBar`will revert to displaying the home-as-up indicator provided by the`Activity`'s theme in the`android.R.attr.homeAsUpIndicator`attribute instead of the animated drawer glyph.

<br />

<br />

|                          Parameters                          ||
|----------|----------------------------------------------------|
| `enable` | `boolean`: true to enable, false to disable <br /> |

### setDrawerSlideAnimationEnabled

added in[version 25.4.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setDrawerSlideAnimationEnabled (boolean enabled)
```

Specifies whether the drawer arrow should animate when the drawer position changes.

<br />

|                                            Parameters                                             ||
|-----------|----------------------------------------------------------------------------------------|
| `enabled` | `boolean`: if this is`true`then the animation will run, else it will be skipped <br /> |

### setHomeAsUpIndicator

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeAsUpIndicator (Drawable indicator)
```

Set the up indicator to display when the drawer indicator is not enabled.

If you pass`null`to this method, the default drawable from the theme will be used.

<br />

|                                                 Parameters                                                 ||
|-------------|-----------------------------------------------------------------------------------------------|
| `indicator` | `Drawable`: A drawable to use for the up indicator, or null to use the theme's default <br /> |

**See also:**

- [setDrawerIndicatorEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean))  

### setHomeAsUpIndicator

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setHomeAsUpIndicator (int resId)
```

Set the up indicator to display when the drawer indicator is not enabled.

If you pass 0 to this method, the default drawable from the theme will be used.

<br />

|                                                  Parameters                                                   ||
|---------|------------------------------------------------------------------------------------------------------|
| `resId` | `int`: Resource ID of a drawable to use for the up indicator, or 0 to use the theme's default <br /> |

**See also:**

- [setDrawerIndicatorEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean))  

### setToolbarNavigationClickListener

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setToolbarNavigationClickListener (View.OnClickListener onToolbarNavigationClickListener)
```

When DrawerToggle is constructed with a Toolbar, it sets the click listener on the Navigation icon. If you want to listen for clicks on the Navigation icon when DrawerToggle is disabled ([setDrawerIndicatorEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean)), you should call this method with your listener and DrawerToggle will forward click events to that listener when drawer indicator is disabled.

<br />

|                            Parameters                             ||
|------------------------------------|-------------------------------|
| `onToolbarNavigationClickListener` | `View.OnClickListener` <br /> |

**See also:**

- [setDrawerIndicatorEnabled(boolean)](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle#setDrawerIndicatorEnabled(boolean))  

### syncState

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void syncState ()
```

Synchronize the state of the drawer indicator/affordance with the linked DrawerLayout.

This should be called from your`Activity`'s[onPostCreate](https://developer.android.com/reference/android/app/Activity.html#onPostCreate(android.os.Bundle))method to synchronize after the DrawerLayout's instance state has been restored, and any other time when the state may have diverged in such a way that the ActionBarDrawerToggle was not notified. (For example, if you stop forwarding appropriate drawer events for a period of time.)

<br />

<br />

-

  ## Interfaces

  - [ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)
  - [ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener)
  - [ActionBar.TabListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.TabListener)
  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.DelegateProvider)
  - [AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)
-

  ## Classes

  - [ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)
  - [ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)
  - [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)
  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle)
  - [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)
  - [AlertDialog.Builder](https://developer.android.com/reference/android/support/v7/app/AlertDialog.Builder)
  - [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity)
  - [AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate)
  - [AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog)
  - [AppCompatDialogFragment](https://developer.android.com/reference/android/support/v7/app/AppCompatDialogFragment)
  - [AppCompatViewInflater](https://developer.android.com/reference/android/support/v7/app/AppCompatViewInflater)
  - [MediaRouteActionProvider](https://developer.android.com/reference/android/support/v7/app/MediaRouteActionProvider)
  - [MediaRouteButton](https://developer.android.com/reference/android/support/v7/app/MediaRouteButton)
  - [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog)
  - [MediaRouteChooserDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialogFragment)
  - [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog)
  - [MediaRouteControllerDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialogFragment)
  - [MediaRouteDialogFactory](https://developer.android.com/reference/android/support/v7/app/MediaRouteDialogFactory)
  - [MediaRouteDiscoveryFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteDiscoveryFragment)