react-native-statusbar-manager

1.0.0 • Public • Published

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 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

Package Sidebar

Install

npm i react-native-statusbar-manager

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

33.3 kB

Total Files

13

Last publish

Collaborators

  • bellzhong
  • magicismight
  • wsong910