第二个 Android 11 开发者预览版现已推出,快来测试并分享您的反馈吧

WearableDrawerLayout.DrawerStateCallback

public static abstract class WearableDrawerLayout.DrawerStateCallback
extends Object

java.lang.Object
   ↳ android.support.wearable.view.drawer.WearableDrawerLayout.DrawerStateCallback


Listener for monitoring events about drawers.

Summary

Public constructors

WearableDrawerLayout.DrawerStateCallback()

Public methods

abstract void onDrawerClosed(View drawerView)

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

abstract void onDrawerOpened(View drawerView)

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

abstract void onDrawerStateChanged(int newState)

Called when the drawer motion state changes.

Inherited methods

From class java.lang.Object

Public constructors

WearableDrawerLayout.DrawerStateCallback

WearableDrawerLayout.DrawerStateCallback ()

Public methods

onDrawerClosed

void onDrawerClosed (View drawerView)

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

Parameters
drawerView View

onDrawerOpened

void onDrawerOpened (View drawerView)

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

Parameters
drawerView View

onDrawerStateChanged

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
newState int: The new WearableDrawerView.DrawerState