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 - |
Pregunta
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.
Solución
Otros consejos
put this line
mDrawerLayout.openDrawer(drawerListView);
at the end of onCreate it workes fine.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow