try to move the code to onResume()
and set a flag that the action is done so it won't happen every time activity goes foreground
Android Navigation Drawer Open On Activity Create
-
28-06-2022 - |
Question
I do have a simple requirement. I want new android Navigation Drawer to open upon start of Activity.
I have tried
mDrawerLayout.openDrawer(drawerListView);
in onCreate of host activity. But it didn't work.
Any kind of help would be appreciated. Thank you.
Solution
OTHER TIPS
put this line
mDrawerLayout.openDrawer(drawerListView);
at the end of onCreate it workes fine.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow