Android Action Bar Icon – For Toggle of Navigation Drawer

Basically I was trying to set the icon which toggles the drawer in android, but my icon wasn’t showing. I had to add this code to sync the state of the drawer just to show my icon:

@Override

    protected void onPostCreate(Bundle savedInstanceState) {

        super.onPostCreate(savedInstanceState);

        // Sync the toggle state after onRestoreInstanceState has occurred.

        mDrawerToggle.syncState();

    }

You may also like...