Method setDrawerListener is deprecated

david glorioso picture david glorioso · Feb 25, 2016 · Viewed 83.6k times · Source

While I'm doing something on my app, I see that the navigation drawer on my app reduced its size. But I'm not doing anything on that.

navigation drawer

Then, after checking the code, I saw that setDrawerListener is deprecated. Does anyone has a solution to this?

drawerLayout.setDrawerListener(actionBarDrawerToggle);

Answer

Luxi Liu picture Luxi Liu · Feb 26, 2016

Use addDrawerListener() instead.