added in version 1.0.0
belongs to Maven artifact androidx.wear:wear:1.0.0-beta01

WearableDrawerLayout.DrawerStateCallback

public static class WearableDrawerLayout.DrawerStateCallback
extends Object

java.lang.Object
   ↳ androidx.wear.widget.drawer.WearableDrawerLayout.DrawerStateCallback


Listener for monitoring events about drawers.

Summary

Public constructors

WearableDrawerLayout.DrawerStateCallback()

Public methods

void onDrawerClosed(WearableDrawerLayout layout, WearableDrawerView drawerView)

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

void onDrawerOpened(WearableDrawerLayout layout, WearableDrawerView drawerView)

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

void onDrawerStateChanged(WearableDrawerLayout layout, int newState)

Called when the drawer motion state changes.

Inherited methods

Public constructors

WearableDrawerLayout.DrawerStateCallback

added in version 1.0.0
public WearableDrawerLayout.DrawerStateCallback ()

Public methods

onDrawerClosed

added in version 1.0.0
public void onDrawerClosed (WearableDrawerLayout layout, 
                WearableDrawerView drawerView)

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

Parameters
layout WearableDrawerLayout

drawerView WearableDrawerView

onDrawerOpened

added in version 1.0.0
public void onDrawerOpened (WearableDrawerLayout layout, 
                WearableDrawerView drawerView)

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

Parameters
layout WearableDrawerLayout

drawerView WearableDrawerView

onDrawerStateChanged

added in version 1.0.0
public void onDrawerStateChanged (WearableDrawerLayout layout, 
                int newState)

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

Parameters
layout WearableDrawerLayout

newState int