The title explains it all. All what I want to do is to know if the navigation drawer is open or not. I searched a lot on the net and found the method isDrawerOpen(int drawerGravity)
but couldn't find a satisfactory answer which explains how to use it in a method. I would appreciate if anyone explains it to me.
Thanks in advance!
Assuming you have defined a drawerlayout in xml:
Detect
DrawerLayout
opened, closed, slide DrawerLayout.DrawerListenerCheck Drawer is opened
That listener use:)
Use:
mDrawerLayout.isDrawerOpen() method
Example:
By the following way you can find the Drawer is open or close..
shakeJ's answer its the correct one, and remember you can use the onDrawerSlide to be able to fire other functions... for example I used it to change the StatusBar Color.