Browse Source

Side Drawer Problem Resolved for Android (#1997)

While working I got a situation in which I wanted to open the side drawer on a button click. But I was not able to that. So I made some changes and now I am able to achieve the required functionality.
Nikhil Saxena 7 years ago
parent
commit
e1c0133ed6

+ 2
- 2
android/app/src/main/java/com/reactnativenavigation/views/SideMenu.java View File

58
     }
58
     }
59
 
59
 
60
     public void setVisible(boolean visible, boolean animated, Side side) {
60
     public void setVisible(boolean visible, boolean animated, Side side) {
61
-        if (!isShown() && visible) {
61
+        if (visible) {
62
             openDrawer(animated, side);
62
             openDrawer(animated, side);
63
         }
63
         }
64
 
64
 
65
-        if (isShown() && !visible) {
65
+        if (!visible) {
66
             closeDrawer(animated, side);
66
             closeDrawer(animated, side);
67
         }
67
         }
68
     }
68
     }