I have problem with my application, I use NavigationDrawer in it, and whenever my app is launching, NavigationDrawer is opened. I have no idea what is causing this, but this is annoying... How can I prevent this behavior?
Asked
Active
Viewed 43 times
2 Answers
0
Maybe you can close the Navigation drawer.
Ex:
mDrawerLayout.closeDrawer(mDrawerList);

erad
- 1,766
- 2
- 17
- 26
0
Aww, found what was causing this problem. In my main fragment object, nawigation drawer is set by setUp method of "NavigationDrawerFragment" object. In this method there are lines:
if (!mUserLearnedDrawer && !mFromSavedInstanceState) {
mDrawerLayout.openDrawer(mFragmentContainerView);
}
which are causing problem that I described. As I do not need this navigation drawer to show at first app run, I deleted those lines. That's it. I guess too much coffe and too little of sleep does not help my perceptiveness, as I was browsing my code and did not figured this out... Anyway, thanks for help.

Adam Staszak
- 1,674
- 14
- 16