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

后端 未结 1 1322
情歌与酒
情歌与酒 2021-02-08 13:00

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 o

相关标签:
1条回答
  • 2021-02-08 13:15

    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+.

    0 讨论(0)
提交回复
热议问题