Is there any way to disable sliding animation of the NavigationDrawer's icon? I mean the effect, when you click the icon or open the Drawer with slide gesture. (I still use the ActionBar at the moment)
Preview
Is there any way to disable sliding animation of the NavigationDrawer's icon? I mean the effect, when you click the icon or open the Drawer with slide gesture. (I still use the ActionBar at the moment)
Preview
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.
@Override
public void onDrawerSlide(View drawerView, float slideOffset)
{
if(drawerView!=null && drawerView == rightDrawerListView){
super.onDrawerSlide(drawerView, 0);
}else{
super.onDrawerSlide(drawerView, slideOffset);
}
}
Look at this answer. Since support v7 version 25.3.0, you can disable the animation, you can disable the animation using one line of code.
yourActionBarDrawerToggle.setDrawerSlideAnimationEnabled(false);