Browse Source

Upgrade gradle plugin

Guy Carmeli 8 years ago
parent
commit
991bb9a106

+ 11
- 11
android/app/src/main/java/com/reactnativenavigation/views/RctView.java View File

47
     };
47
     };
48
     private boolean mIsScrollEventListenerRegistered = false;
48
     private boolean mIsScrollEventListenerRegistered = false;
49
 
49
 
50
-
51
     private final View.OnAttachStateChangeListener mStateChangeListener =
50
     private final View.OnAttachStateChangeListener mStateChangeListener =
52
             new View.OnAttachStateChangeListener() {
51
             new View.OnAttachStateChangeListener() {
53
                 @Override
52
                 @Override
100
         super(ctx);
99
         super(ctx);
101
         setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
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
                 @Override
104
                 @Override
107
                 public void onDisplayed() {
105
                 public void onDisplayed() {
108
                     if (onDisplayedListener != null) {
106
                     if (onDisplayedListener != null) {
111
 
109
 
112
                     setupScrollViewWithBottomTabs();
110
                     setupScrollViewWithBottomTabs();
113
                 }
111
                 }
114
-            };
115
-        }
112
+            } : onDisplayedListener;
116
 
113
 
117
         mReactRootView = new RnnReactRootView(ctx, onDisplayedListenerInternal);
114
         mReactRootView = new RnnReactRootView(ctx, onDisplayedListenerInternal);
118
         mReactRootView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
115
         mReactRootView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
119
-
116
+        Bundle passProps = createPassProps(screen);
120
         String componentName = screen.screenId;
117
         String componentName = screen.screenId;
118
+        mReactRootView.startReactApplication(rctInstanceManager, componentName, passProps);
119
+
120
+        addView(mReactRootView);
121
+    }
122
+
123
+    private Bundle createPassProps(Screen screen) {
121
         Bundle passProps = new Bundle();
124
         Bundle passProps = new Bundle();
122
         passProps.putString(Screen.KEY_SCREEN_INSTANCE_ID, screen.screenInstanceId);
125
         passProps.putString(Screen.KEY_SCREEN_INSTANCE_ID, screen.screenInstanceId);
123
         passProps.putString(Screen.KEY_NAVIGATOR_ID, screen.navigatorId);
126
         passProps.putString(Screen.KEY_NAVIGATOR_ID, screen.navigatorId);
125
         if (screen.passedProps != null) {
128
         if (screen.passedProps != null) {
126
             BridgeUtils.addMapToBundle(screen.passedProps, passProps);
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
     private void setupScrollViewWithBottomTabs() {
134
     private void setupScrollViewWithBottomTabs() {

+ 2
- 2
android/gradle/wrapper/gradle-wrapper.properties View File

1
-#Mon Dec 28 10:00:20 PST 2015
1
+#Wed Jul 13 11:11:29 IDT 2016
2
 distributionBase=GRADLE_USER_HOME
2
 distributionBase=GRADLE_USER_HOME
3
 distributionPath=wrapper/dists
3
 distributionPath=wrapper/dists
4
 zipStoreBase=GRADLE_USER_HOME
4
 zipStoreBase=GRADLE_USER_HOME
5
 zipStorePath=wrapper/dists
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