belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1
ActionBarDrawerToggle
public
class
ActionBarDrawerToggle
extends Object
implements
DrawerLayout.DrawerListener
java.lang.Object | |
↳ | android.support.v7.app.ActionBarDrawerToggle |
This class provides a handy way to tie together the functionality of
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:
Call syncState()
from your Activity
's
onPostCreate
to synchronize the
indicator with the state of the linked DrawerLayout after onRestoreInstanceState
has occurred.
ActionBarDrawerToggle
can be used directly as a
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
in your
ActionBar theme.
Summary
Nested classes | |
---|---|
interface |
ActionBarDrawerToggle.Delegate
|
interface |
ActionBarDrawerToggle.DelegateProvider
Allows an implementing Activity to return an |
Public constructors | |
---|---|
ActionBarDrawerToggle(Activity activity, DrawerLayout drawerLayout, int openDrawerContentDescRes, int closeDrawerContentDescRes)
Construct a new ActionBarDrawerToggle. |
|
ActionBarDrawerToggle(Activity activity, DrawerLayout drawerLayout, Toolbar toolbar, int openDrawerContentDescRes, int closeDrawerContentDescRes)
Construct a new ActionBarDrawerToggle with a Toolbar. |
Public methods | |
---|---|
DrawerArrowDrawable
|
getDrawerArrowDrawable()
|
View.OnClickListener
|
getToolbarNavigationClickListener()
Returns the fallback listener for Navigation icon click events. |
boolean
|
isDrawerIndicatorEnabled()
|
boolean
|
isDrawerSlideAnimationEnabled()
|
void
|
onConfigurationChanged(Configuration newConfig)
This method should always be called by your |
void
|
onDrawerClosed(View drawerView)
|
void
|
onDrawerOpened(View drawerView)
|
void
|
onDrawerSlide(View drawerView, float slideOffset)
|
void
|
onDrawerStateChanged(int newState)
|