Skip to content Skip to sidebar Skip to footer

Remove System Menu Bar From React Native Android App

My problem is simple and I have been unable to find a solution. The menu bar is very annoying in my app and I am hoping that there is a way to remove it.

Solution 1:

Looking at Hiding the Navigation Bar I found this:

You can hide the navigation bar on Android 4.0 and higher using the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag. This snippet hides both the navigation bar and the status bar:

ViewdecorView= getWindow().getDecorView();
// Hide both the navigation bar and the status bar.// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as// a general rule, you should design your app to hide the status bar whenever you// hide the navigation bar.intuiOptions= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
          | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);

I do not know if that's exactly what you was looking for, but you can test it.

Solution 2:

I suggest you read more about native modules, it enables you to write native code and access it from JS.

http://facebook.github.io/react-native/docs/native-modules-android.html#content

Also the StatusBar module is very similar to what you want to do here, you can have a look at the source.

https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java#L110

Post a Comment for "Remove System Menu Bar From React Native Android App"