Is there any way for me to determine whether the navigation drawer is opening or closing? I have read about isDrawerOpen()
and isDrawerVisible()
methods, but they only return true if the navigation drawer is opened or is visible respectively.
I also read about onDrawerSlide(View drawerView, float slideOffset)
method which gets called when the drawer is moving. The slideOffset
is the floating value between 0 and 1 telling which position the drawer is at now. But even that gets called when the drawer is opening and closing.
What I need to do is, to do something only when the drawer is opening but not when closing, something tells me that I have to use onDrawerSlide(View drawerView, float slideOffset)
method, but I just can't figure out how to check if it is opening and is not closing.
Thank you