DrawerLayout.SimpleDrawerListener


public abstract class DrawerLayout.SimpleDrawerListener implements DrawerLayout.DrawerListener


Stub/no-op implementations of all methods of DrawerListener. Override this if you only care about a few of the available callback methods.

Summary

Public constructors

Public methods

void

Called when a drawer has settled in a completely closed state.

void

Called when a drawer has settled in a completely open state.

void
onDrawerSlide(@NonNull View drawerView, float slideOffset)

Called when a drawer's position changes.

void
onDrawerStateChanged(int newState)

Called when the drawer motion state changes.

Public constructors

SimpleDrawerListener

Added in 1.0.0
public SimpleDrawerListener()

Public methods

onDrawerClosed

Added in 1.3.0-alpha01
public void onDrawerClosed(@NonNull View drawerView)

Called when a drawer has settled in a completely closed state.

Parameters
@NonNull View drawerView

Drawer view that is now closed

onDrawerOpened

Added in 1.3.0-alpha01
public void onDrawerOpened(@NonNull View drawerView)

Called when a drawer has settled in a completely open state. The drawer is interactive at this point.

Parameters
@NonNull View drawerView

Drawer view that is now open

onDrawerSlide

Added in 1.3.0-alpha01
public void onDrawerSlide(@NonNull View drawerView, float slideOffset)

Called when a drawer's position changes.

Parameters
@NonNull View drawerView

The child view that was moved

float slideOffset

The new offset of this drawer within its range, from 0-1

onDrawerStateChanged

Added in 1.3.0-alpha01
public void onDrawerStateChanged(int newState)

Called when the drawer motion state changes. The new state will be one of STATE_IDLE, STATE_DRAGGING or STATE_SETTLING.

Parameters
int newState

The new drawer motion state