I am trying to implement a two-drawer layout using android v7 support library. I have a navigation box on the left (Gravity.START) and a notification box on the right (Gravity.END). The problem is that I need a hamburger in the action bar to remain a hamburger when the notification drawer is pulled out, but stay animated and switch to the arrow if the drawer is pulled out. Currently, it changes to an arrow when one of them is pulled out. I successfully turned off the animation, overriding onDrawerSlide(View, float)and calling only super.onDrawerSlide(View, float)if View is a navigation box and does nothing if View is a notification box as follows:
@Override
public void onDrawerSlide(View drawerView, float slideOffset) {
if(drawerView.equals(navigationDrawer)) {
super.onDrawerSlide(drawerView, slideOffset);
}
else {
}
}
However, as soon as the notification box is fully open, the icon still changes to an arrow. Any idea how to disable this change?
source
share