ソースを参照

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 年 前
コミット
e1c0133ed6
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2
    2
      android/app/src/main/java/com/reactnativenavigation/views/SideMenu.java

+ 2
- 2
android/app/src/main/java/com/reactnativenavigation/views/SideMenu.java ファイルの表示

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