Doesn't work with react-native-navigation
X-Tender opened this issue · comments
I don't know if its ok to blame the "issue" here or at react-native-navigation
but maybe you can discover the Issue with it.
When I try to set the immersive mode nothing happens. Maybe the reason is the unusual way to start the native app with the react-native-navigation.
Feel free to close the issue when you think that I should bother the react-native-navigation
guys 😄
I guess you're right, it might be about the activity
of the Android Application.
The core code of this package is very simple: source
activity.getWindow().getDecorView().setSystemUiVisibility()
And from the react-native-navigation
DOC for Android:
Your MainActivity should extend com.reactnativenavigation.controllers.SplashActivity instead of ReactActivity
To test or debug this, you should check for the activity
.
And you could try insert the setSystemUiVisibility
code block from this package to react-native-navigation
. Possibly somewhere like /android/app/src/main/java/com/reactnativenavigation/NavigationApplication.java
. So the app could start in Immsersive mode.
Updating my previous comment:
In my experience this module works with react-native-navigation
exactly as desired.
Thanks a lot for such a helpful library. I was trying to implement the same functionality in a similar manner using native modules, however, due to limited experience I would've taken much longer to do so.