Trying to add a ReactRootView to my existing layout which looks like this
ReactRootView contentView = new ReactRootView(context);
LinearLayout container = (LinearLayout) parent.findViewById(R.id.view_container);
contentView.startReactApplication(reactInstanceManager, "MyComponent", null)
container.addView(contentView, -1, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
With the above setup, my reactview never gets rendered, since the height is always 0. I have to explicitly provide the height to my layout as -
container.addView(contentView, -1, new LinearLayout.LayoutParams(MATCH_PARENT, 200));
How does ReactRootView handles the layout params when embedded inside a android native app ?
PS: Apologies for cross post did try to raise this issue here : https://github.com/facebook/react-native/issues/13476