[Android] modal cannot work if ReactRootView is created and cached in previous activity #9496

markzhai opened this Issue Aug 21, 2016 · 2 comments


None yet

2 participants


When I do pre-load of ReactRootView in previous Activity (in a hybrid app):

        ReactRootView rootView = new ReactRootView(activity);
                ((ReactApplication) activity.getApplication()).getReactNativeHost().getReactInstanceManager(),

and later use the created view in ReactActivity directly


Modal cannot show in this case then (works fine if I do not do this pre-load), I guess this is due to Android window issue as it is using the previous native activity to add window.

Any ideas on this? TimePickerAndroid works just fine.

react-native 0.31, Mac, Android.

jokester commented Aug 22, 2016 edited

Creating ReactRootView with a MutableContextWrapper might be a workaround (so we can change underlying Context in the 2nd Activity).


@jokester it works, thanks

@markzhai markzhai closed this Aug 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment