Reputation: 330
I'm very, VERY new in android. So, I started with a simple application, created on min API 14, I personalized some strings and I started to modify the application drawer.
When I tried to debug my simple app and launch it on my Nexus 5 (updated to last stock lollipop), I have this little annoying bug, with this icons:
In all cases, when the navigation drawer is opened/closed it shows that ARROW, instead of changing between the "menu" icon and "arrow" icon. What I'm doing wrong?
Searching for a solution, I found some lines in code, like this:
I don't know how to do... If you could explain me what's wrong, I'll be very happy.
Upvotes: 1
Views: 178
Reputation: 6099
You need to syncState()
call of your ActionBarDrawerToggle object from onPostCreate()
:
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
// Sync the toggle state after onRestoreInstanceState has occurred.
mDrawerToggle.syncState();
}
Upvotes: 2