欢迎参加我们将于 6 月 3 日举行的 #Android11:Beta 版发布会

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

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

DrawerStateCallback

public DrawerStateCallback ()

Public methods

onDrawerClosed

public void onDrawerClosed (WearableDrawerLayout layout, 
                WearableDrawerView drawerView)

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

Parameters
layout WearableDrawerLayout

drawerView WearableDrawerView

onDrawerOpened

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

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