0.0.9 • Published 4 years ago

react-native-pure-status-bar v0.0.9

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

react-native-pure-status-bar

This is a module which help you set status bar style and show/hide status bar.

Installation

npm i react-native-pure-status-bar
// link below 0.60
react-native link react-native-pure-status-bar

Setup

iOS

Modify ios/<ProjectName>/Info.plist, make sure UIViewControllerBasedStatusBarAppearance is false.

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Android

Modify android/app/src/main/res/values/styles.xml, make sure windowTranslucentStatus is true.

<resources>

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowTranslucentStatus">true</item>
        <item name="colorAccent">your color</item>
    </style>

</resources>

Usage

import statusBar from 'react-native-pure-status-bar'

// at first, you must set the status bar style
// style: set text color, dark | light
// animated: if the transition to the new style should be animated, ios only
statusBar.setStyle('dark', true)

// Whether to hide status bar
// animation: fade | slide | none, ios only
statusBar.setHidden(true, animation)

// Whether to show network activity indicator, ios only
statusBar.setNetworkActivityIndicatorVisible(true)

// android only
statusBar.setNavigationBarColor('#ffffff')
0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago