Search code examples
androiddrawerlayout

Best way to hide action items related to the content view using the DrawerLayout on sub-pages


I have implemented the new DrawerLayout and want to follow the guidelines and hide menu items related to the content view when opening the menu. How can this be done on pages that are not using the ActionBarDrawerToggle? I didn't see an easy solution to hide/show menu items without having this open/close event to rely on.

Hope someone have implemented this and can share their experiences!


Solution

  • There are also open/close events on the drawer itself, via a DrawerListener you register with setDrawerListener().