Most visited

Recently visited

DrawerLayout.DrawerListener

public static interface DrawerLayout.DrawerListener

android.support.v4.widget.DrawerLayout.DrawerListener
Known Indirect Subclasses


监听器用于监控有关抽屉的事件。

Summary

Public methods

abstract void onDrawerClosed(View drawerView)

当抽屉完全处于完全关闭状态时调用。

abstract void onDrawerOpened(View drawerView)

当抽屉完全打开状态时调用。

abstract void onDrawerSlide(View drawerView, float slideOffset)

当抽屉的位置改变时调用。

abstract void onDrawerStateChanged(int newState)

当抽屉运动状态改变时调用。

Public methods

onDrawerClosed

void onDrawerClosed (View drawerView)

当抽屉完全处于完全关闭状态时调用。

Parameters
drawerView View: Drawer view that is now closed

onDrawerOpened

void onDrawerOpened (View drawerView)

当抽屉完全打开状态时调用。 抽屉此时是互动的。

Parameters
drawerView View: Drawer view that is now open

onDrawerSlide

void onDrawerSlide (View drawerView, 
                float slideOffset)

当抽屉的位置改变时调用。

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

onDrawerStateChanged

void onDrawerStateChanged (int newState)

当抽屉运动状态改变时调用。 新的状态将是一个STATE_IDLESTATE_DRAGGING或者STATE_SETTLING

Parameters
newState int: The new drawer motion state

Hooray!