thebylito / react-native-navigation-bar-color

React Native component to change bottom bar/navigation bar color on Android
MIT License
269 stars 49 forks source link

hide navigation bar it also affect to the status bar behavior #42

Open SiddharthSZ opened 3 years ago

s-mikulich commented 2 years ago

Solution which works for me. Steps: 1) go to file node_modules/react-native-navigation-bar-color/android/src/main/java/com/thebylito/navigationbarcolor/NavigationBarColorModule.java 2) Finde method hideNavigationBar (line: 139) 3) Change code inside this condition 'getCurrentActivity() != null':

- old code: if (getCurrentActivity() != null) { View decorView = getCurrentActivity().getWindow().getDecorView(); decorView.setSystemUiVisibility(UI_FLAG_HIDE_NAV_BAR); }

- new code: if (getCurrentActivity() != null) { getCurrentActivity().getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY ); }

4) Create new build!