Browse Source

Add ContentView after TopBar (#871)

closes #851
Guy Carmeli 7 years ago
parent
commit
6319f0c649

+ 0
- 2
android/app/src/main/java/com/reactnativenavigation/react/NavigationReactGateway.java View File

@@ -21,8 +21,6 @@ import java.util.List;
21 21
 
22 22
 import javax.annotation.Nullable;
23 23
 
24
-//import android.view.View;
25
-
26 24
 public class NavigationReactGateway implements ReactGateway {
27 25
 
28 26
     private final ReactNativeHost host;

+ 6
- 1
android/app/src/main/java/com/reactnativenavigation/screens/CollapsingSingleScreen.java View File

@@ -43,7 +43,12 @@ public class CollapsingSingleScreen extends SingleScreen {
43 43
         contentView = new CollapsingContentView(getContext(), screenParams.screenId, screenParams.navigationParams);
44 44
         setViewMeasurer();
45 45
         setupCollapseDetection((CollapsingTopBar) topBar);
46
-        addView(contentView, createLayoutParams());
46
+        post(new Runnable() {
47
+            @Override
48
+            public void run() {
49
+                addView(contentView, createLayoutParams());
50
+            }
51
+        });
47 52
     }
48 53
 
49 54
     private void setViewMeasurer() {