I am using a Fragement for navigation drawer and hence can\'t use onPostCreated
to call syncState
public class NavigationDrawerFragment extends Frag
I had this problem as well. For me, importing android.support.v7.app.ActionBarDrawerToggle
instead of android.support.v4.app.ActionBarDrawerToggle
fixed it. You also have to remove the R.drawable.ic_drawer
argument when you define mDrawerToggle:
mDrawerToggle = new ActionBarDrawerToggle(
getActivity(),
mDrawerLayout,
R.string.navigation_drawer_open,
R.string.navigation_drawer_close
)
If that doesn't work, try some of the answers to this question.