public interface

DrawerLayout.DrawerListener

 androidx.drawerlayout.widget.DrawerLayout.DrawerListener

Subclasses:

DrawerLayout.SimpleDrawerListener, ActionBarDrawerToggle, ActionBarDrawerToggle

Overview

Listener for monitoring events about drawers.

Summary

Methods
public voidonDrawerClosed(View drawerView)

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

public voidonDrawerOpened(View drawerView)

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

public voidonDrawerSlide(View drawerView, float slideOffset)

Called when a drawer's position changes.

public voidonDrawerStateChanged(int newState)

Called when the drawer motion state changes.

Methods

public void onDrawerSlide(View drawerView, float slideOffset)

Called when a drawer's position changes.

Parameters:

drawerView: The child view that was moved
slideOffset: The new offset of this drawer within its range, from 0-1

public void onDrawerOpened(View drawerView)

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

Parameters:

drawerView: Drawer view that is now open

public void onDrawerClosed(View drawerView)

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

Parameters:

drawerView: Drawer view that is now closed

public void onDrawerStateChanged(int newState)

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

Parameters:

newState: The new drawer motion state