Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable animation of drawer icon in double navigation drawer for right drawer

I have a Double Navigation Drawer

I have two problems.

1) The navigation drawer icon on the left (3 bars) animate when opening or closing the navigation drawer on the right.

2) I do not know how to add the icon to the right and have it animate only for the right drawer.

like image 390
clocksmith Avatar asked Feb 18 '14 22:02

clocksmith


1 Answers

You need to override the onDrawerSlide method of ActionBarDrawerToggle and set the slideOffset to 0 if the drawer is right drawer. So this would disable the animation of the navigation drawer image enter image description here for right drawer.

  @Override
  public void onDrawerSlide(View drawerView, float slideOffset) 
  {
        if(drawerView!=null && drawerView == rightDrawerListView){
              super.onDrawerSlide(drawerView, 0);
        }else{
              super.onDrawerSlide(drawerView, slideOffset);
        }
  }

This worked for me similar to Google+.

like image 147
Jagadeesh Avatar answered Nov 05 '22 07:11

Jagadeesh