react-native-statusbar-manager

StatusBar manager for steep

Usage no npm install needed!

<script type="module">
  import reactNativeStatusbarManager from 'https://cdn.skypack.dev/react-native-statusbar-manager';
</script>

README

react-native-statusbar-manager

Installation

$ npm install react-native-statusbar-manager --save
$ react-native link react-native-statusbar-manager

Usage

Attention

  • The statusBar in this moudule is not the system statusBar.
  • The theme of activity could not be set to fitsSystemWindow = true, must be set to fitsSystemWindow=false

Example


public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test);
        RNStatusbarManagerModule.translucentStatusBar(this, true);
        View content = LayoutInflater.from(this).inflate(R.layout.test, null);
        RNStatusbarManagerModule.steepStatusbarView(this, content, android.R.color.white);
    }
}

Set avtivity to full screen with transparent background statusbar and dark(or not) word(icon) in statusbar。

 RNStatusbarManagerModule.translucentStatusBar(this, true);//or false

Set statusBar to color white backgroud:

 RNStatusbarManagerModule.steepStatusbarView(this, content, android.R.color.white);

Set statusBar to color with alpha:

RNStatusbarManagerModule.steepStatusbarView(this,content,0xcc,0x88);

Set activity looks like fitsSystemWindow = false or not:

RNStatusbarManagerModule.steepStatusbarView(this,content,false);//or true