Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a1c8c258f | ||
|
|
603354a132 | ||
|
|
dfe548170f | ||
|
|
1040688064 | ||
|
|
aebe3c60bf | ||
|
|
3dd497135f | ||
|
|
7ff3f4bd21 | ||
|
|
f964e9512b | ||
|
|
fad6608be8 |
@@ -21,9 +21,9 @@ description: Control the device status bar.
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | Windows 10 Store | Travis CI |
|
||||
|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI|
|
||||
|:-:|:-:|:-:|:-:|:-:|:-:|
|
||||
|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[](https://travis-ci.org/apache/cordova-plugin-statusbar)|
|
||||
|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[](https://travis-ci.org/apache/cordova-plugin-statusbar)|
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
|
||||
+10
-1
@@ -20,7 +20,16 @@
|
||||
-->
|
||||
# Release Notes
|
||||
|
||||
### 2.2.2 (Feb 28, 2017)
|
||||
* [CB-12188](https://issues.apache.org/jira/browse/CB-12188) Status Bar is not changing in some specific **Android** phone (Red MI 3s Prime)
|
||||
* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped`
|
||||
* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0**
|
||||
* [CB-12196](https://issues.apache.org/jira/browse/CB-12196) **iOS** fix Status Bar Not Hiding
|
||||
* [CB-12141](https://issues.apache.org/jira/browse/CB-12141) **iOS** fix white app screen after camera overlay shown on iPad
|
||||
* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges
|
||||
|
||||
### 2.2.1 (Dec 07, 2016)
|
||||
* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.2.1
|
||||
* [CB-10288](https://issues.apache.org/jira/browse/CB-10288) statusbar plugin interaction with iOS multitasking
|
||||
* [CB-10158](https://issues.apache.org/jira/browse/CB-10158) (ios) fix StatusBar issue when recovering from fullscreen video
|
||||
* [CB-10341](https://issues.apache.org/jira/browse/CB-10341) ios, document statusTap event
|
||||
@@ -74,7 +83,7 @@
|
||||
|
||||
### 1.0.1 (Jun 17, 2015)
|
||||
* add auto-tests for basic api
|
||||
* [CB-9180](https://issues.apache.org/jira/browse/CB-9180) Add correct supported check for Windows 8.1 desktop
|
||||
* [CB-9180](https://issues.apache.org/jira/browse/CB-9180) Add correct supported check for **Windows 8.1** desktop
|
||||
* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-statusbar documentation translation: cordova-plugin-statusbar
|
||||
* fix npm md issue
|
||||
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "cordova-plugin-statusbar",
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.2",
|
||||
"description": "Cordova StatusBar Plugin",
|
||||
"types": "./types/index.d.ts",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-statusbar",
|
||||
"platforms": [
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
xmlns:rim="http://www.blackberry.com/ns/widgets"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="cordova-plugin-statusbar"
|
||||
version="2.2.1">
|
||||
version="2.2.2">
|
||||
<name>StatusBar</name>
|
||||
<description>Cordova StatusBar Plugin</description>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
@@ -154,7 +154,7 @@ public class StatusBar extends CordovaPlugin {
|
||||
window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
try {
|
||||
// Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21
|
||||
window.getClass().getDeclaredMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref));
|
||||
window.getClass().getMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref));
|
||||
} catch (IllegalArgumentException ignore) {
|
||||
LOG.e(TAG, "Invalid hexString argument, use f.i. '#999999'");
|
||||
} catch (Exception ignore) {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
}
|
||||
|
||||
@property (atomic, assign) BOOL statusBarOverlaysWebView;
|
||||
@property (atomic, assign) BOOL statusBarVisible;
|
||||
|
||||
- (void) overlaysWebView:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
|
||||
+13
-20
@@ -146,6 +146,8 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
[self.viewController.view sendSubviewToBack:fakeScrollView]; // Send it to the very back of the view heirarchy
|
||||
fakeScrollView.contentSize = CGSizeMake(UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height * 2.0f); // Make the scroll view longer than the screen itself
|
||||
fakeScrollView.contentOffset = CGPointMake(0.0f, UIScreen.mainScreen.bounds.size.height); // Scroll down so a tap will take scroll view back to the top
|
||||
|
||||
_statusBarVisible = ![UIApplication sharedApplication].isStatusBarHidden;
|
||||
}
|
||||
|
||||
- (void)onReset {
|
||||
@@ -379,6 +381,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
- (void) hide:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
_statusBarVisible = NO;
|
||||
UIApplication* app = [UIApplication sharedApplication];
|
||||
|
||||
if (!app.isStatusBarHidden)
|
||||
@@ -411,6 +414,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
- (void) show:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
_statusBarVisible = YES;
|
||||
UIApplication* app = [UIApplication sharedApplication];
|
||||
|
||||
if (app.isStatusBarHidden)
|
||||
@@ -448,26 +452,13 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
if (isIOS7) {
|
||||
CGRect bounds = [self.viewController.view.window bounds];
|
||||
if (CGRectEqualToRect(bounds, CGRectZero)) {
|
||||
bounds = [[UIScreen mainScreen] bounds];
|
||||
}
|
||||
bounds = [self invertFrameIfNeeded:bounds];
|
||||
|
||||
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
|
||||
self.viewController.view.frame = bounds;
|
||||
} else if (self.viewController.presentedViewController != nil) {
|
||||
// https://issues.apache.org/jira/browse/CB-11018
|
||||
BOOL isIOS8 = (IsAtLeastiOSVersion(@"8.0"));
|
||||
BOOL isIOS9 = (IsAtLeastiOSVersion(@"9.0"));
|
||||
if (isIOS8 && !isIOS9) {
|
||||
// iOS 8
|
||||
bounds = CGRectMake(0, 0, bounds.size.width, bounds.size.height);
|
||||
} else {
|
||||
// iOS7, iOS9+
|
||||
if ([self.viewController.presentedViewController.presentationController isKindOfClass:[UIPopoverPresentationController class]] || UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) {
|
||||
bounds = CGRectMake(0, 0, bounds.size.width, bounds.size.height);
|
||||
} else {
|
||||
bounds = CGRectMake(0, 0, bounds.size.height, bounds.size.width);
|
||||
}
|
||||
}
|
||||
}
|
||||
self.viewController.view.frame = bounds;
|
||||
|
||||
self.webView.frame = bounds;
|
||||
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
@@ -476,8 +467,10 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
CGFloat height = statusBarFrame.size.height;
|
||||
|
||||
if (!self.statusBarOverlaysWebView) {
|
||||
// CB-10158 If a full screen video is playing the status bar height will be 0, set it to 20
|
||||
frame.origin.y = height > 0 ? height: 20;
|
||||
if (_statusBarVisible) {
|
||||
// CB-10158 If a full screen video is playing the status bar height will be 0, set it to 20 if _statusBarVisible
|
||||
frame.origin.y = height > 0 ? height: 20;
|
||||
}
|
||||
} else {
|
||||
// Even if overlay is used, we want to handle in-call/recording/hotspot larger status bar
|
||||
frame.origin.y = height >= 20 ? height - 20 : 0;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
xmlns:rim="http://www.blackberry.com/ns/widgets"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="cordova-plugin-statusbar-tests"
|
||||
version="2.2.1">
|
||||
version="2.2.2">
|
||||
<name>Cordova StatusBar Plugin Tests</name>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
|
||||
Vendored
+77
@@ -0,0 +1,77 @@
|
||||
// Type definitions for Apache Cordova StatusBar plugin
|
||||
// Project: https://github.com/apache/cordova-plugin-statusbar
|
||||
// Definitions by: Xinkai Chen <https://github.com/Xinkai>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Global object StatusBar.
|
||||
*/
|
||||
interface Window {
|
||||
StatusBar: StatusBar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The StatusBar object provides some functions to customize the iOS and Android StatusBar.
|
||||
*/
|
||||
interface StatusBar {
|
||||
/**
|
||||
* On iOS 7, make the statusbar overlay or not overlay the WebView.
|
||||
* @param isOverlay 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.
|
||||
*/
|
||||
overlaysWebView: (isOverlay: boolean) => void;
|
||||
|
||||
/**
|
||||
* Use the default statusbar (dark text, for light backgrounds).
|
||||
*/
|
||||
styleDefault: () => void;
|
||||
|
||||
/**
|
||||
* Use the lightContent statusbar (light text, for dark backgrounds).
|
||||
*/
|
||||
styleLightContent: () => void;
|
||||
|
||||
/**
|
||||
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||
*/
|
||||
styleBlackTranslucent: () => void;
|
||||
|
||||
/**
|
||||
* Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||
*/
|
||||
styleBlackOpaque: () => void;
|
||||
|
||||
/**
|
||||
* On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false,
|
||||
* you can set the background color of the statusbar by color name.
|
||||
* @param color Supported color names are:
|
||||
* black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
*/
|
||||
backgroundColorByName: (color: string) => void;
|
||||
|
||||
/**
|
||||
* Sets the background color of the statusbar by a hex string.
|
||||
* @param color CSS shorthand properties are also supported.
|
||||
* On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB).
|
||||
* On WP7 and WP8 you can also specify values as #AARRGGBB, where AA is an alpha value
|
||||
*/
|
||||
backgroundColorByHexString: (color: string) => void;
|
||||
|
||||
/**
|
||||
* Hide the statusbar.
|
||||
*/
|
||||
hide: () => void;
|
||||
|
||||
/**
|
||||
* Show the statusbar.
|
||||
*/
|
||||
show: () => void;
|
||||
|
||||
/**
|
||||
* Read this property to see if the statusbar is visible or not.
|
||||
*/
|
||||
isVisible: boolean;
|
||||
}
|
||||
|
||||
declare var StatusBar: StatusBar;
|
||||
Reference in New Issue
Block a user