react-native-system-ui-flags

3.0.0 • Public • Published

react-native-system-ui-flags

Plugin for changing system ui visibility on Android

import SystemUiFlags from 'react-native-system-ui-flags';
 
const FULL_SCREEN_SYSTEM_UI_FLAGS = 0
        | SystemUiFlags.SYSTEM_UI_FLAG_HIDE_NAVIGATION
        | SystemUiFlags.SYSTEM_UI_FLAG_FULLSCREEN
        | SystemUiFlags.SYSTEM_UI_FLAG_IMMERSIVE
        | SystemUiFlags.SYSTEM_UI_FLAG_LAYOUT_STABLE
        | SystemUiFlags.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
        | SystemUiFlags.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
        
SystemUiFlags.updateSystemUiFlags(FULL_SCREEN_SYSTEM_UI_FLAGS);
 
import SystemUiFlags from 'react-native-system-ui-flags';
 
const FULL_SCREEN_SYSTEM_UI_FLAGS = 0
        | SystemUiFlags.SYSTEM_UI_FLAG_HIDE_NAVIGATION
        | SystemUiFlags.SYSTEM_UI_FLAG_FULLSCREEN
        | SystemUiFlags.SYSTEM_UI_FLAG_IMMERSIVE
        | SystemUiFlags.SYSTEM_UI_FLAG_LAYOUT_STABLE
        | SystemUiFlags.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
        | SystemUiFlags.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
        
SystemUiFlags.getSystemUiFlags((flags) => {
  const newFlags = flags | FULL_SCREEN_SYSTEM_UI_FLAGS;
  SystemUiFlags.setSystemUiFlags(newFlags);
});
 

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-system-ui-flags

Weekly Downloads

4

Version

3.0.0

License

MIT

Unpacked Size

9.85 kB

Total Files

10

Last publish

Collaborators

  • nklhrstv