public static interface DrawerLayout.DrawerListener
android.support.v4.widget.DrawerLayout.DrawerListener |
Known Indirect Subclasses |
监听器用于监控有关抽屉的事件。
Public methods |
|
---|---|
abstract void |
onDrawerClosed(View drawerView) 当抽屉完全处于完全关闭状态时调用。 |
abstract void |
onDrawerOpened(View drawerView) 当抽屉完全打开状态时调用。 |
abstract void |
onDrawerSlide(View drawerView, float slideOffset) 当抽屉的位置改变时调用。 |
abstract void |
onDrawerStateChanged(int newState) 当抽屉运动状态改变时调用。 |
void onDrawerClosed (View drawerView)
当抽屉完全处于完全关闭状态时调用。
Parameters | |
---|---|
drawerView |
View : Drawer view that is now closed |
void onDrawerOpened (View drawerView)
当抽屉完全打开状态时调用。 抽屉此时是互动的。
Parameters | |
---|---|
drawerView |
View : Drawer view that is now open |
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 |
void onDrawerStateChanged (int newState)
当抽屉运动状态改变时调用。 新的状态将是一个STATE_IDLE
, STATE_DRAGGING
或者STATE_SETTLING
。
Parameters | |
---|---|
newState |
int : The new drawer motion state |