Closed sbouiachref closed 5 years ago
You can set your own drawerListener to the drawerLayout:
drawerLayout.setDrawerListener(drawerToggle);
I dont understand, can you explain to me how can I add this listener !! . also have you an example using this library ? Thanks
Copied from the Android documentation:
drawerLayout.setDrawerListener(new DrawerLayout.DrawerListener() {
@Override
public void onDrawerSlide(View drawerView, float slideOffset) {
// Respond when the drawer's position changes
}
@Override
public void onDrawerOpened(View drawerView) {
// Respond when the drawer is opened
}
@Override
public void onDrawerClosed(View drawerView) {
// Respond when the drawer is closed
}
@Override
public void onDrawerStateChanged(int newState) {
// Respond when the drawer motion state changes
}
});
More information regarding the DrawerListener: https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener
anyone have a response pls