-1

How to disable rotation animation on clicking 'navigation drawer indicator'
( hamburger icon) ?

I'm using a Htc model on geny motion emulator(1 GB ram). On clicking Navigation drawer icon, there is a slight lag on nav panel sliding (opening and closing).

So,I think, disabling animation would make sliding smoother.

(I'm using navigation drawer default template)

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
arunberlin
  • 97
  • 1
  • 3
  • 8

1 Answers1

1

You can use the setDrawerSlideAnimationEnabled(boolean) to enable or disable the drawer arrow animation when the drawer position changes. An example of this would be:

// Installs drawer toggle
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout,
                 R.string.drawer_open, R.string.drawer_close);

// Disables animation
drawerToggle.setDrawerSlideAnimationEnabled(false);
Abhi
  • 3,431
  • 1
  • 17
  • 35