Procházet zdrojové kódy

Added the ContentView to FragmentScreen

Yedidya Kennard před 8 roky
rodič
revize
92a5dda4f0

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/screens/FragmentScreen.java Zobrazit soubor

@@ -10,6 +10,7 @@ import android.widget.FrameLayout;
10 10
 
11 11
 import com.reactnativenavigation.params.ScreenParams;
12 12
 import com.reactnativenavigation.utils.ViewUtils;
13
+import com.reactnativenavigation.views.ContentView;
13 14
 import com.reactnativenavigation.views.TitleBarBackButtonListener;
14 15
 
15 16
 import java.lang.reflect.InvocationTargetException;
@@ -32,8 +33,11 @@ public class FragmentScreen extends Screen {
32 33
     protected void createContent() {
33 34
         content = new FrameLayout(getContext());
34 35
         content.setId(ViewUtils.generateViewId());
36
+        ContentView contentView = new ContentView(getContext(), screenParams.screenId, screenParams.passProps, screenParams.navigationParams, null);
37
+        addView(contentView, 0, 0);
35 38
         addView(content, MATCH_PARENT, MATCH_PARENT);
36 39
         addFragment();
40
+        contentView.init();
37 41
     }
38 42
 
39 43
     private void addFragment() {