DrawerLayout.SimpleDrawerListener


abstract class DrawerLayout.SimpleDrawerListener : 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 functions

Unit
onDrawerClosed(drawerView: View)

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

Unit
onDrawerOpened(drawerView: View)

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

Unit
onDrawerSlide(drawerView: View, slideOffset: Float)

Called when a drawer's position changes.

Unit

Called when the drawer motion state changes.

Public constructors

SimpleDrawerListener

Added in 1.0.0
SimpleDrawerListener()

Public functions

onDrawerClosed

Added in 1.3.0-alpha01
fun onDrawerClosed(drawerView: View): Unit

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

Parameters
drawerView: View

Drawer view that is now closed

onDrawerOpened

Added in 1.3.0-alpha01
fun onDrawerOpened(drawerView: View): Unit

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

Parameters
drawerView: View

Drawer view that is now open

onDrawerSlide

Added in 1.3.0-alpha01
fun onDrawerSlide(drawerView: View, slideOffset: Float): Unit

Called when a drawer's position changes.

Parameters
drawerView: View

The child view that was moved

slideOffset: Float

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

onDrawerStateChanged

Added in 1.3.0-alpha01
fun onDrawerStateChanged(newState: Int): Unit

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

Parameters
newState: Int

The new drawer motion state