Procházet zdrojové kódy

Upgrade gradle plugin

Guy Carmeli před 8 roky
rodič
revize
991bb9a106

+ 11
- 11
android/app/src/main/java/com/reactnativenavigation/views/RctView.java Zobrazit soubor

@@ -47,7 +47,6 @@ public class RctView extends FrameLayout {
47 47
     };
48 48
     private boolean mIsScrollEventListenerRegistered = false;
49 49
 
50
-
51 50
     private final View.OnAttachStateChangeListener mStateChangeListener =
52 51
             new View.OnAttachStateChangeListener() {
53 52
                 @Override
@@ -100,9 +99,8 @@ public class RctView extends FrameLayout {
100 99
         super(ctx);
101 100
         setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
102 101
 
103
-        OnDisplayedListener onDisplayedListenerInternal = onDisplayedListener;
104
-        if (screen.bottomTabsHiddenOnScroll) {
105
-            onDisplayedListenerInternal = new OnDisplayedListener() {
102
+        final OnDisplayedListener onDisplayedListenerInternal = screen.bottomTabsHiddenOnScroll ?
103
+            new OnDisplayedListener() {
106 104
                 @Override
107 105
                 public void onDisplayed() {
108 106
                     if (onDisplayedListener != null) {
@@ -111,13 +109,18 @@ public class RctView extends FrameLayout {
111 109
 
112 110
                     setupScrollViewWithBottomTabs();
113 111
                 }
114
-            };
115
-        }
112
+            } : onDisplayedListener;
116 113
 
117 114
         mReactRootView = new RnnReactRootView(ctx, onDisplayedListenerInternal);
118 115
         mReactRootView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
119
-
116
+        Bundle passProps = createPassProps(screen);
120 117
         String componentName = screen.screenId;
118
+        mReactRootView.startReactApplication(rctInstanceManager, componentName, passProps);
119
+
120
+        addView(mReactRootView);
121
+    }
122
+
123
+    private Bundle createPassProps(Screen screen) {
121 124
         Bundle passProps = new Bundle();
122 125
         passProps.putString(Screen.KEY_SCREEN_INSTANCE_ID, screen.screenInstanceId);
123 126
         passProps.putString(Screen.KEY_NAVIGATOR_ID, screen.navigatorId);
@@ -125,10 +128,7 @@ public class RctView extends FrameLayout {
125 128
         if (screen.passedProps != null) {
126 129
             BridgeUtils.addMapToBundle(screen.passedProps, passProps);
127 130
         }
128
-
129
-        mReactRootView.startReactApplication(rctInstanceManager, componentName, passProps);
130
-
131
-        addView(mReactRootView);
131
+        return passProps;
132 132
     }
133 133
 
134 134
     private void setupScrollViewWithBottomTabs() {

+ 2
- 2
android/gradle/wrapper/gradle-wrapper.properties Zobrazit soubor

@@ -1,6 +1,6 @@
1
-#Mon Dec 28 10:00:20 PST 2015
1
+#Wed Jul 13 11:11:29 IDT 2016
2 2
 distributionBase=GRADLE_USER_HOME
3 3
 distributionPath=wrapper/dists
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip