1.0.0 • Published 5 years ago

react-native-statusbar-manager v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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
1.0.0

5 years ago

0.4.5

5 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.3.0

6 years ago

0.4.0

6 years ago

0.1.0

6 years ago