How do I change my button image with navigation drawer opening and closing
I have a navigation button for my navigation fragment which turns active and opens a navigation drawer menu upon click: Now when I click it, it turns active as follows: However, I want to associate it with a navigation drawer such a way that, even if I do not click the button and slide open the navigation drawer, the button turns active when the navigation drawer menu is open and when closed by sliding back in from right to left, the button turns red/inactive. The code which I am trying to work with is as follows: private boolean mIsNavigationOpen = false; private DrawerLayout drawerLayout;