You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-__StatusBarBackgroundColor__ (color hex string, no default value). On iOS 7, set the background color of the statusbar by a hex string (#RRGGBB) at startup. If this value is not set, the background color will be transparent.
60
+
-__StatusBarBackgroundColor__ (color hex string, no default value). On iOS, set the background color of the statusbar by a hex string (#RRGGBB) at startup. If this value is not set, the background color will be transparent.
-__StatusBarStyle__ (status bar style, defaults to lightcontent). On iOS 7, set the status bar style. Available options default, lightcontent, blacktranslucent, blackopaque.
64
+
-__StatusBarStyle__ (status bar style, defaults to lightcontent). On iOS, set the status bar style. Available options default, lightcontent, blacktranslucent, blackopaque.
-__StatusBarDefaultScrollToTop__ (boolean, defaults to false). On iOS 7, allows the Cordova WebView to use default scroll-to-top behavior. Defaults to false so you can listen to the "statusTap" event (described below) and customize the behavior instead.
68
+
-__StatusBarDefaultScrollToTop__ (boolean, defaults to false). On iOS, allows the Cordova WebView to use default scroll-to-top behavior. Defaults to false so you can listen to the "statusTap" event (described below) and customize the behavior instead.
The Android 5+ guidelines specify using a different color for the statusbar than your main app color (unlike the uniform statusbar color of many iOS 7+ apps), so you may want to set the statusbar color at runtime instead via `StatusBar.backgroundColorByHexString` or `StatusBar.backgroundColorByName`. One way to do that would be:
73
+
The Android 5+ guidelines specify using a different color for the statusbar than your main app color (unlike the uniform statusbar color of many iOS apps), so you may want to set the statusbar color at runtime instead via `StatusBar.backgroundColorByHexString` or `StatusBar.backgroundColorByName`. One way to do that would be:
74
74
```js
75
75
if (cordova.platformId=='android') {
76
76
StatusBar.backgroundColorByHexString("#333");
77
77
}
78
78
```
79
79
80
+
It is also possible to make the status bar semi-transparent. For example, a black status bar with 20% opacity:
During runtime you can use the StatusBar.hide function below, but if you want the StatusBar to be hidden at app startup, you must modify your app's Info.plist file.
91
+
During runtime you can use the StatusBar.hide function below, but if you want the StatusBar to be hidden at app startup on iOS, you must modify your app's Info.plist file.
84
92
85
93
Add/edit these two attributes if not present. Set **"Status bar is initially hidden"** to **"YES"** and set **"View controller-based status bar appearance"** to **"NO"**. If you edit it manually without Xcode, the keys and values are:
86
94
@@ -125,20 +133,21 @@ Events
125
133
StatusBar.overlaysWebView
126
134
=================
127
135
128
-
On iOS 7, make the statusbar overlay or not overlay the WebView.
136
+
Make the statusbar overlay or not overlay the WebView.
129
137
130
138
StatusBar.overlaysWebView(true);
131
139
132
140
Description
133
141
-----------
134
142
135
-
On iOS 7, set to false to make the statusbar appear like iOS 6. Set the style and background color to suit using the other functions.
143
+
Set to true to make the statusbar overlay on top of your app. Ensure that you adjust your styling accordingly so that your app's title bar or content is not covered. Set to false to make the statusbar solid and not overlay your app. You can then set the style and background color to suit using the other functions.
136
144
137
145
138
146
Supported Platforms
139
147
-------------------
140
148
141
-
- iOS
149
+
- iOS 7+
150
+
- Android 5+
142
151
143
152
Quick Example
144
153
-------------
@@ -158,7 +167,7 @@ Supported Platforms
158
167
-------------------
159
168
160
169
- iOS
161
-
- Android 6+
170
+
- Android 6+
162
171
- Windows Phone 7
163
172
- Windows Phone 8
164
173
- Windows Phone 8.1
@@ -175,7 +184,7 @@ Supported Platforms
175
184
-------------------
176
185
177
186
- iOS
178
-
- Android 6+
187
+
- Android 6+
179
188
- Windows Phone 7
180
189
- Windows Phone 8
181
190
- Windows Phone 8.1
@@ -192,7 +201,7 @@ Supported Platforms
192
201
-------------------
193
202
194
203
- iOS
195
-
- Android 6+
204
+
- Android 6+
196
205
- Windows Phone 7
197
206
- Windows Phone 8
198
207
- Windows Phone 8.1
@@ -209,7 +218,7 @@ Supported Platforms
209
218
-------------------
210
219
211
220
- iOS
212
-
- Android 6+
221
+
- Android 6+
213
222
- Windows Phone 7
214
223
- Windows Phone 8
215
224
- Windows Phone 8.1
@@ -218,7 +227,7 @@ Supported Platforms
218
227
StatusBar.backgroundColorByName
219
228
=================
220
229
221
-
On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by color name.
230
+
On iOS, when you set StatusBar.overlaysWebView to false, you can set the background color of the statusbar by color name.
222
231
223
232
StatusBar.backgroundColorByName("red");
224
233
@@ -248,9 +257,9 @@ CSS shorthand properties are also supported.
0 commit comments