mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-18 17:02:49 +08:00
deprecate blacktranslucent, blackopaque, styleBlackTranslucent and styleBlackOpaque (#173)
This commit is contained in:
parent
24d5f278d0
commit
2928339611
@ -34,9 +34,7 @@ description: Control the device status bar.
|
||||
This installation method requires cordova 5.0+
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
Older versions of cordova can still install via the __deprecated__ id
|
||||
|
||||
cordova plugin add org.apache.cordova.statusbar
|
||||
It is also possible to install via repo url directly ( unstable )
|
||||
|
||||
cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git
|
||||
@ -59,7 +57,7 @@ Preferences
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
- __StatusBarStyle__ (status bar style, defaults to lightcontent). Set the status bar style (e.g. text color). Available options: default, lightcontent, blacktranslucent, blackopaque.
|
||||
- __StatusBarStyle__ (status bar style, defaults to lightcontent). Set the status bar style (e.g. text color). Available options: `default`, `lightcontent`. `blacktranslucent` and `blackopaque` are also available, but __deprecated__, will be removed in next major release, use `lightcontent` instead.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
@ -197,6 +195,8 @@ Supported Platforms
|
||||
StatusBar.styleBlackTranslucent
|
||||
=================
|
||||
|
||||
Note: `styleBlackTranslucent` is __deprecated__ and will be removed in next major release, use `styleLightContent` instead.
|
||||
|
||||
Use the blackTranslucent statusbar (light text, for dark backgrounds).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
@ -212,6 +212,8 @@ Supported Platforms
|
||||
StatusBar.styleBlackOpaque
|
||||
=================
|
||||
|
||||
Note: `styleBlackOpaque` is __deprecated__ and will be removed in next major release, use `styleLightContent` instead.
|
||||
|
||||
Use the blackOpaque statusbar (light text, for dark backgrounds).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
@ -63,7 +63,11 @@ public class StatusBar extends CordovaPlugin {
|
||||
setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000"));
|
||||
|
||||
// Read 'StatusBarStyle' from config.xml, default is 'lightcontent'.
|
||||
setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent"));
|
||||
String styleSetting = preferences.getString("StatusBarStyle", "lightcontent");
|
||||
if (styleSetting.equalsIgnoreCase("blacktranslucent") || styleSetting.equalsIgnoreCase("blackopaque")) {
|
||||
LOG.w(TAG, styleSetting +" is deprecated and will be removed in next major release, use lightcontent");
|
||||
}
|
||||
setStatusBarStyle(styleSetting);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -137,7 +137,11 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
setting = @"StatusBarStyle";
|
||||
if ([self settingForKey:setting]) {
|
||||
[self setStatusBarStyle:[self settingForKey:setting]];
|
||||
NSString * styleSetting = [self settingForKey:setting];
|
||||
if ([styleSetting isEqualToString:@"blacktranslucent"] || [styleSetting isEqualToString:@"blackopaque"]) {
|
||||
NSLog(@"%@ is deprecated and will be removed in next major release, use lightcontent", styleSetting);
|
||||
}
|
||||
[self setStatusBarStyle:styleSetting];
|
||||
}
|
||||
|
||||
setting = @"StatusBarDefaultScrollToTop";
|
||||
|
@ -59,12 +59,12 @@ var StatusBar = {
|
||||
},
|
||||
|
||||
styleBlackTranslucent: function () {
|
||||
// #88000000 ? Apple says to use lightContent instead
|
||||
console.warn('styleBlackTranslucent is deprecated and will be removed in next major release, use styleLightContent');
|
||||
exec(null, null, "StatusBar", "styleBlackTranslucent", []);
|
||||
},
|
||||
|
||||
styleBlackOpaque: function () {
|
||||
// #FF000000 ? Apple says to use lightContent instead
|
||||
console.warn('styleBlackOpaque is deprecated and will be removed in next major release, use styleLightContent');
|
||||
exec(null, null, "StatusBar", "styleBlackOpaque", []);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user