From a07c24fe78feaadeba628795023ac464344208ed Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Wed, 7 Dec 2016 16:55:08 -0800 Subject: [PATCH 01/15] CB-12224 Incremented plugin version. --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4027d6c..d31c942 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-statusbar", - "version": "2.2.1", + "version": "2.2.2-dev", "description": "Cordova StatusBar Plugin", "cordova": { "id": "cordova-plugin-statusbar", diff --git a/plugin.xml b/plugin.xml index a84ab03..1b5e693 100644 --- a/plugin.xml +++ b/plugin.xml @@ -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-dev"> StatusBar Cordova StatusBar Plugin Apache 2.0 diff --git a/tests/plugin.xml b/tests/plugin.xml index 34b1bc1..5e4127b 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -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-dev"> Cordova StatusBar Plugin Tests Apache 2.0 From 59101557b792ad45b356754bbd52f5fc6b2d6796 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Fri, 9 Dec 2016 13:45:32 +0300 Subject: [PATCH 02/15] CB-12230 Removed Windows 8.1 build badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 22c84d2..d31193f 100644 --- a/README.md +++ b/README.md @@ -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 | -|:-:|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?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-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?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-8.1-phone,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| +|Android 4.4|Android 5.1|iOS|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| # cordova-plugin-statusbar From d601f1a143547d252f7d366526b7af74a7455f18 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Sun, 11 Dec 2016 12:58:46 -0800 Subject: [PATCH 03/15] CB-12236 - Fixed RELEASENOTES for cordova-plugin-statusbar --- RELEASENOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 9568a1b..4009cd3 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,6 +21,7 @@ # Release Notes ### 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 From 834b8cb5fba212788febcba9d2695cf8a5db0159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Fri, 16 Dec 2016 00:03:03 +0100 Subject: [PATCH 04/15] Closing invalid pull request: close #72 From a120ba1a1ffb27d46f2ac7962648e6f8a7a5b24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Fri, 9 Dec 2016 00:18:23 +0100 Subject: [PATCH 05/15] CB-12141 (ios) fix white app screen after camera overlay shown on iPad This closes #73 --- src/ios/CDVStatusBar.m | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index 37c6dcd..ee1d6cb 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -448,26 +448,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; From fa57e92c5582d0edc7fc4b1f4be7f5e3380d93cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Tue, 27 Dec 2016 20:32:54 +0100 Subject: [PATCH 06/15] CB-12196 (iOS) fix Status Bar Not Hiding This closes #74 --- src/ios/CDVStatusBar.h | 1 + src/ios/CDVStatusBar.m | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVStatusBar.h b/src/ios/CDVStatusBar.h index 84f37fa..0be08cc 100644 --- a/src/ios/CDVStatusBar.h +++ b/src/ios/CDVStatusBar.h @@ -30,6 +30,7 @@ } @property (atomic, assign) BOOL statusBarOverlaysWebView; +@property (atomic, assign) BOOL statusBarVisible; - (void) overlaysWebView:(CDVInvokedUrlCommand*)command; diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m index ee1d6cb..58fbc29 100644 --- a/src/ios/CDVStatusBar.m +++ b/src/ios/CDVStatusBar.m @@ -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) @@ -463,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; From a204f69ffe2ac0812043b676ffde2558858cd6fa Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Wed, 18 Jan 2017 13:38:21 +0300 Subject: [PATCH 07/15] CB-12363 Added build badges for iOS 9.3 and 10.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d31193f..50ab55e 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ description: Control the device status bar. # under the License. --> -|Android 4.4|Android 5.1|iOS|Windows 10 Store|Travis CI| -|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| +|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| # cordova-plugin-statusbar From 995e4fdf9de78609ff0fb30bab2610b9e5293410 Mon Sep 17 00:00:00 2001 From: Nikita Matrosov Date: Thu, 19 Jan 2017 16:11:46 +0300 Subject: [PATCH 08/15] CB-12369: Add plugin typings from DefinitelyTyped This closes #75 --- package.json | 1 + types/index.d.ts | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 types/index.d.ts diff --git a/package.json b/package.json index d31c942..a2321a0 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "cordova-plugin-statusbar", "version": "2.2.2-dev", "description": "Cordova StatusBar Plugin", + "types": "./types/index.d.ts", "cordova": { "id": "cordova-plugin-statusbar", "platforms": [ diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 0000000..87df2e7 --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,77 @@ +// Type definitions for Apache Cordova StatusBar plugin +// Project: https://github.com/apache/cordova-plugin-statusbar +// Definitions by: Xinkai Chen +// 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; \ No newline at end of file From 916cccc2c00a1b7c77e2e738c83e74a22bdd55e7 Mon Sep 17 00:00:00 2001 From: olln3 Date: Thu, 9 Feb 2017 08:35:45 +0800 Subject: [PATCH 09/15] CB-12188 Status Bar is not changing in some specific android phone (Red MI 3s Prime) This closes #76 --- src/android/StatusBar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/StatusBar.java b/src/android/StatusBar.java index 294a5db..6c99d78 100644 --- a/src/android/StatusBar.java +++ b/src/android/StatusBar.java @@ -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) { From cb1297b0ac65d73340bb31a5e562f2bd7845902c Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 28 Feb 2017 17:41:27 -0800 Subject: [PATCH 10/15] CB-12519 Updated version and RELEASENOTES.md for release 2.2.2 --- RELEASENOTES.md | 10 ++- package.json | 2 +- plugin.xml | 155 ++++++++++++++++++----------------------------- tests/plugin.xml | 35 ++--------- 4 files changed, 73 insertions(+), 129 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4009cd3..a35a6b4 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,14 @@ --> # 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 @@ -75,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 diff --git a/package.json b/package.json index a2321a0..eef0f46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-statusbar", - "version": "2.2.2-dev", + "version": "2.2.2", "description": "Cordova StatusBar Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 1b5e693..efca65e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,99 +1,60 @@ - - - - - StatusBar - Cordova StatusBar Plugin - Apache 2.0 - cordova,statusbar - - - - - - - + + + StatusBar + Cordova StatusBar Plugin + Apache 2.0 + cordova,statusbar + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index 5e4127b..f9b3726 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -1,31 +1,6 @@ - - - - - Cordova StatusBar Plugin Tests - Apache 2.0 - - - + + + Cordova StatusBar Plugin Tests + Apache 2.0 + From 95eb824d0ac37b542ffc2dad38d00c11dd1f660b Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 28 Feb 2017 17:56:01 -0800 Subject: [PATCH 11/15] Set VERSION to 2.2.3-dev (via coho) --- package.json | 2 +- plugin.xml | 155 +++++++++++++++++++++++++++++------------------ tests/plugin.xml | 35 +++++++++-- 3 files changed, 128 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index eef0f46..86c2988 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-statusbar", - "version": "2.2.2", + "version": "2.2.3-dev", "description": "Cordova StatusBar Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index efca65e..d58e496 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,60 +1,99 @@ - - - StatusBar - Cordova StatusBar Plugin - Apache 2.0 - cordova,statusbar - - - - - - - - - - - - - - - - - - + + + + + StatusBar + Cordova StatusBar Plugin + Apache 2.0 + cordova,statusbar + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index f9b3726..a4afad1 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -1,6 +1,31 @@ - - - Cordova StatusBar Plugin Tests - Apache 2.0 - + + + + + Cordova StatusBar Plugin Tests + Apache 2.0 + + + From d980145c98258d947e2682c26bf51471a960e98a Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 21 Apr 2017 19:27:17 -0700 Subject: [PATCH 12/15] CB-12685: added package.json to tests folder --- tests/package.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/package.json diff --git a/tests/package.json b/tests/package.json new file mode 100644 index 0000000..5e2ba47 --- /dev/null +++ b/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-statusbar-tests", + "version": "2.2.3-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-statusbar-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} From 3f552ed7343bf5f7982abc187afefe0b097ae7f2 Mon Sep 17 00:00:00 2001 From: Andrea Lazzarotto Date: Sun, 26 Feb 2017 20:11:07 +0100 Subject: [PATCH 13/15] CB-10879: Enable overlaysWebView on Android API 21+ This closes #77 This patch enables devices running Android API 21+ to have the status bar overlaying the WebView, i.e. `StatusBar.overlaysWebView(true)`. It lets any Android version call `StatusBar.overlaysWebView(false)` to disable the overlay, which is actually the default behavior on that platform. --- src/android/StatusBar.java | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/android/StatusBar.java b/src/android/StatusBar.java index 6c99d78..7b4d946 100644 --- a/src/android/StatusBar.java +++ b/src/android/StatusBar.java @@ -142,6 +142,23 @@ public class StatusBar extends CordovaPlugin { return true; } + if ("overlaysWebView".equals(action)) { + if (Build.VERSION.SDK_INT >= 21) { + this.cordova.getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + try { + setStatusBarTransparent(args.getBoolean(0)); + } catch (JSONException ignore) { + LOG.e(TAG, "Invalid boolean argument"); + } + } + }); + return true; + } + else return args.getBoolean(0) == false; + } + return false; } @@ -164,4 +181,21 @@ public class StatusBar extends CordovaPlugin { } } } + + private void setStatusBarTransparent(final boolean transparent) { + if (Build.VERSION.SDK_INT >= 21) { + final Window window = cordova.getActivity().getWindow(); + if (transparent) { + window.getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); + window.setStatusBarColor(Color.TRANSPARENT); + } + else { + window.getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_VISIBLE); + } + } + } } From ecf61e78009c2592841286bb06027b577a42ff2a Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Wed, 26 Apr 2017 16:34:23 +0300 Subject: [PATCH 14/15] CB-12622 Added Android 6.0 build badge to README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 50ab55e..523a23a 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ description: Control the device status bar. # under the License. --> -|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| -|:-:|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| +|Android 4.4|Android 5.1|Android 6.0|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-statusbar/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-statusbar.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-statusbar)| # cordova-plugin-statusbar From 77a6ae5dfe664bb209c1fa79847bc9d81e137fc8 Mon Sep 17 00:00:00 2001 From: filmaj Date: Thu, 27 Apr 2017 13:07:47 -0700 Subject: [PATCH 15/15] CB-12736 Updated version and RELEASENOTES.md for release 2.2.3 (via coho) --- RELEASENOTES.md | 5 +++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index a35a6b4..7a47dce 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,11 @@ --> # Release Notes +### 2.2.3 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` +* [CB-10879](https://issues.apache.org/jira/browse/CB-10879) Enable overlaysWebView on **Android** API 21+ +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder + ### 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` diff --git a/package.json b/package.json index 86c2988..882df99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-statusbar", - "version": "2.2.3-dev", + "version": "2.2.3", "description": "Cordova StatusBar Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index d58e496..c82e290 100644 --- a/plugin.xml +++ b/plugin.xml @@ -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.3-dev"> + version="2.2.3"> StatusBar Cordova StatusBar Plugin Apache 2.0 diff --git a/tests/plugin.xml b/tests/plugin.xml index a4afad1..70194f7 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -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.3-dev"> + version="2.2.3"> Cordova StatusBar Plugin Tests Apache 2.0