Compare commits
92 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f1ccb5e9d | |||
|
|
686b33113f | ||
|
|
8fb34774c6 | ||
|
|
022fa3bdad | ||
|
|
217f792101 | ||
|
|
13645b9f53 | ||
|
|
5f6614c3c1 | ||
|
|
eb9e106510 | ||
|
|
9703774c6c | ||
|
|
86d60a91b4 | ||
|
|
d456212b4c | ||
|
|
5290c2e294 | ||
|
|
14b151370e | ||
|
|
fade76bfee | ||
|
|
288bd719e0 | ||
|
|
8dacefad29 | ||
|
|
84081deb75 | ||
|
|
da6c2a8c9d | ||
|
|
33e410a29a | ||
|
|
a538bfed64 | ||
|
|
003fa61030 | ||
|
|
a07612a299 | ||
|
|
727eea3f5c | ||
|
|
adcee9f66f | ||
|
|
c8a13b8da9 | ||
|
|
23944d11f6 | ||
|
|
9b5baa2cf9 | ||
|
|
5b77cae78c | ||
|
|
ecf8ccd164 | ||
|
|
053a90249a | ||
|
|
e0256b2f74 | ||
|
|
b8e0b01888 | ||
|
|
fbc4862dbd | ||
|
|
4c1507b525 | ||
|
|
62e8a187c1 | ||
|
|
e3138a9f08 | ||
|
|
f1407e7ae5 | ||
|
|
70a421bd25 | ||
|
|
bca70c21e9 | ||
|
|
4988b6fec3 | ||
|
|
8da38f5075 | ||
|
|
6352d80a96 | ||
|
|
caf2ae6605 | ||
|
|
3d614115b8 | ||
|
|
9a976a9744 | ||
|
|
611169c89f | ||
|
|
655f6cb1da | ||
|
|
4642be07a6 | ||
|
|
e41c06334e | ||
|
|
c45331b955 | ||
|
|
cdc9295b30 | ||
|
|
049ac41dad | ||
|
|
241d30fff5 | ||
|
|
ca3da118f0 | ||
|
|
b03a8313ef | ||
|
|
08127bf674 | ||
|
|
fff289c0b8 | ||
|
|
ef5fb5b9e6 | ||
|
|
267ebad1be | ||
|
|
70468157c5 | ||
|
|
b204d2747d | ||
|
|
1bb250788e | ||
|
|
2cd86e63ac | ||
|
|
1ae18933d5 | ||
|
|
0364d4a4f9 | ||
|
|
3d8cff14bd | ||
|
|
92fff60cc7 | ||
|
|
0a3dadfdb0 | ||
|
|
0285cf0a21 | ||
|
|
77a6ae5dfe | ||
|
|
ecf61e7800 | ||
|
|
3f552ed734 | ||
|
|
d980145c98 | ||
|
|
dd879140c4 | ||
|
|
95eb824d0a | ||
|
|
cb1297b0ac | ||
|
|
916cccc2c0 | ||
|
|
995e4fdf9d | ||
|
|
a204f69ffe | ||
|
|
fa57e92c55 | ||
|
|
a120ba1a1f | ||
|
|
834b8cb5fb | ||
|
|
d601f1a143 | ||
|
|
59101557b7 | ||
|
|
a07c24fe78 | ||
|
|
a50208bda2 | ||
|
|
6bfc749f84 | ||
|
|
b7dc5ef7cb | ||
|
|
086234b881 | ||
|
|
2c036c9c91 | ||
|
|
940a8ee920 | ||
|
|
53d0b04ed6 |
35
.appveyor.yml
Normal file
35
.appveyor.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
# appveyor file
|
||||
# http://www.appveyor.com/docs/appveyor-yml
|
||||
|
||||
max_jobs: 1
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
init:
|
||||
- git config --global core.autocrlf true
|
||||
|
||||
image:
|
||||
- Visual Studio 2017
|
||||
|
||||
environment:
|
||||
PLATFORM: windows-10-store
|
||||
JUST_BUILD: --justBuild
|
||||
matrix:
|
||||
- nodejs_version: "8"
|
||||
- nodejs_version: "10"
|
||||
- nodejs_version: "12"
|
||||
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
install:
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
- node --version
|
||||
- npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git
|
||||
- npm install -g cordova
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD%
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text eol=lf
|
||||
42
.github/ISSUE_TEMPLATE.md
vendored
Normal file
42
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
Please have a look at the issue templates you get when you click "New issue" in the GitHub UI.
|
||||
We very much prefer issues created by using one of these templates.
|
||||
-->
|
||||
|
||||
### Issue Type
|
||||
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
|
||||
|
||||
- [ ] Bug Report
|
||||
- [ ] Feature Request
|
||||
- [ ] Support Question
|
||||
|
||||
## Description
|
||||
|
||||
## Information
|
||||
<!-- Include all relevant information that might help understand and reproduce the problem -->
|
||||
|
||||
### Command or Code
|
||||
<!-- What command or code is needed to reproduce the problem? -->
|
||||
|
||||
### Environment, Platform, Device
|
||||
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
|
||||
|
||||
|
||||
|
||||
### Version information
|
||||
<!--
|
||||
What are relevant versions you are using?
|
||||
For example:
|
||||
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
|
||||
Other Frameworks: Ionic Framework and CLI version
|
||||
Operating System, Android Studio, Xcode etc.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## Checklist
|
||||
<!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
|
||||
|
||||
- [ ] I searched for already existing GitHub issues about this
|
||||
- [ ] I updated all Cordova tooling to their most recent version
|
||||
- [ ] I included all the necessary information above
|
||||
50
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
Normal file
50
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
name: 🐛 Bug Report
|
||||
about: If something isn't working as expected.
|
||||
|
||||
---
|
||||
|
||||
# Bug Report
|
||||
|
||||
## Problem
|
||||
|
||||
### What is expected to happen?
|
||||
|
||||
|
||||
|
||||
### What does actually happen?
|
||||
|
||||
|
||||
|
||||
## Information
|
||||
<!-- Include all relevant information that might help understand and reproduce the problem -->
|
||||
|
||||
|
||||
|
||||
### Command or Code
|
||||
<!-- What command or code is needed to reproduce the problem? -->
|
||||
|
||||
|
||||
|
||||
### Environment, Platform, Device
|
||||
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
|
||||
|
||||
|
||||
|
||||
### Version information
|
||||
<!--
|
||||
What are relevant versions you are using?
|
||||
For example:
|
||||
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
|
||||
Other Frameworks: Ionic Framework and CLI version
|
||||
Operating System, Android Studio, Xcode etc.
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## Checklist
|
||||
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
|
||||
|
||||
- [ ] I searched for existing GitHub issues
|
||||
- [ ] I updated all Cordova tooling to most recent version
|
||||
- [ ] I included all the necessary information above
|
||||
29
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
Normal file
29
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: 🚀 Feature Request
|
||||
about: A suggestion for a new functionality
|
||||
|
||||
---
|
||||
|
||||
# Feature Request
|
||||
|
||||
## Motivation Behind Feature
|
||||
<!-- Why should this feature be implemented? What problem does it solve? -->
|
||||
|
||||
|
||||
|
||||
## Feature Description
|
||||
<!--
|
||||
Describe your feature request in detail
|
||||
Please provide any code examples or screenshots of what this feature would look like
|
||||
Are there any drawbacks? Will this break anything for existing users?
|
||||
-->
|
||||
|
||||
|
||||
|
||||
## Alternatives or Workarounds
|
||||
<!--
|
||||
Describe alternatives or workarounds you are currently using
|
||||
Are there ways to do this with existing functionality?
|
||||
-->
|
||||
|
||||
|
||||
27
.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: 💬 Support Question
|
||||
about: If you have a question, please check out our Slack or StackOverflow!
|
||||
|
||||
---
|
||||
|
||||
<!------------^ Click "Preview" for a nicer view! -->
|
||||
|
||||
Apache Cordova uses GitHub Issues as a feature request and bug tracker _only_.
|
||||
For usage and support questions, please check out the resources below. Thanks!
|
||||
|
||||
---
|
||||
|
||||
You can get answers to your usage and support questions about **Apache Cordova** on:
|
||||
|
||||
* Slack Community Chat: https://cordova.slack.com (you can sign-up at http://slack.cordova.io/)
|
||||
* StackOverflow: https://stackoverflow.com/questions/tagged/cordova using the tag `cordova`
|
||||
|
||||
---
|
||||
|
||||
If you are using a tool that uses Cordova internally, like e.g. Ionic, check their support channels:
|
||||
|
||||
* **Ionic Framework**
|
||||
* [Ionic Community Forum](https://forum.ionicframework.com/)
|
||||
* [Ionic Worldwide Slack](https://ionicworldwide.herokuapp.com/)
|
||||
* **PhoneGap**
|
||||
* [PhoneGap Developer Community](https://forums.adobe.com/community/phonegap)
|
||||
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,6 +1,5 @@
|
||||
<!--
|
||||
Please make sure the checklist boxes are all checked before submitting the PR. The checklist
|
||||
is intended as a quick reference, for complete details please see our Contributor Guidelines:
|
||||
Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
|
||||
|
||||
http://cordova.apache.org/contribute/contribute_guidelines.html
|
||||
|
||||
@@ -10,14 +9,27 @@ Thanks!
|
||||
### Platforms affected
|
||||
|
||||
|
||||
### What does this PR do?
|
||||
|
||||
### Motivation and Context
|
||||
<!-- Why is this change required? What problem does it solve? -->
|
||||
<!-- If it fixes an open issue, please link to the issue here. -->
|
||||
|
||||
|
||||
### What testing has been done on this change?
|
||||
|
||||
### Description
|
||||
<!-- Describe your changes in detail -->
|
||||
|
||||
|
||||
|
||||
### Testing
|
||||
<!-- Please describe in detail how you tested your changes. -->
|
||||
|
||||
|
||||
|
||||
### Checklist
|
||||
- [ ] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secretary@apache.org.
|
||||
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
|
||||
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
|
||||
- [ ] Added automated test coverage as appropriate for this change.
|
||||
|
||||
- [ ] I've run the tests to see all new and existing tests pass
|
||||
- [ ] I added automated test coverage as appropriate for this change
|
||||
- [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
|
||||
- [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
|
||||
- [ ] I've updated the documentation if necessary
|
||||
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -13,12 +13,3 @@ Thumbs.db
|
||||
*.user
|
||||
|
||||
node_modules
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
16
.npmignore
Normal file
16
.npmignore
Normal file
@@ -0,0 +1,16 @@
|
||||
# CI service configurations
|
||||
.travis.yml
|
||||
.appveyor.yml
|
||||
appveyor.yml
|
||||
|
||||
# Testing, code coverage, and linting
|
||||
.eslintignore
|
||||
.eslintrc.yml
|
||||
|
||||
# Git
|
||||
.git
|
||||
.gitattributes
|
||||
.gitignore
|
||||
|
||||
# Github
|
||||
.github
|
||||
121
.travis.yml
121
.travis.yml
@@ -1,4 +1,119 @@
|
||||
language: node_js
|
||||
# This Travis configuration file is built after a Cordova Paramedic
|
||||
# specific template with minimal modifications and adaptations:
|
||||
# https://github.com/apache/cordova-paramedic/blob/master/.travis.yml
|
||||
|
||||
sudo: false
|
||||
node_js:
|
||||
- "4.2"
|
||||
|
||||
addons:
|
||||
jwt:
|
||||
# SAUCE_ACCESS_KEY
|
||||
secure: Rd/wGSUWGWbc0Y/vqPgI29nybq+j/zWilEIOCBJeRQVwfubdbJNZUIb5DFlSSVzMEavkxZ0PYJ45h21iXyWo3aOoxUJwhkO7QZNzW2MsYzy9qpiKK1jOESXMrpboRWoxg+BL85YbaDF3u1XRy+Xm1nraStT6mDfx5LlUG1Lac6A=
|
||||
|
||||
env:
|
||||
global:
|
||||
- SAUCE_USERNAME=snay
|
||||
- TRAVIS_NODE_VERSION=8
|
||||
- ANDROID_API_LEVEL=28
|
||||
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
|
||||
|
||||
language: node_js
|
||||
node_js: 8
|
||||
|
||||
# yaml anchor/alias: https://medium.com/@tommyvn/travis-yml-dry-with-anchors-8b6a3ac1b027
|
||||
|
||||
_ios: &_ios
|
||||
os: osx
|
||||
osx_image: xcode10.2
|
||||
|
||||
_android: &_android
|
||||
language: android
|
||||
os: linux
|
||||
jdk: oraclejdk8
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
|
||||
- android-$ANDROID_API_LEVEL
|
||||
licenses:
|
||||
- 'android-sdk-preview-license-.+'
|
||||
- 'android-sdk-license-.+'
|
||||
- 'google-gdk-license-.+'
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# local tests, without saucelabs
|
||||
- env: PLATFORM=local/browser
|
||||
<<: *_ios
|
||||
- env: PLATFORM=local/ios-10.0
|
||||
<<: *_ios
|
||||
|
||||
# many tests with saucelabs
|
||||
- env: PLATFORM=browser-chrome
|
||||
- env: PLATFORM=browser-firefox
|
||||
- env: PLATFORM=browser-safari
|
||||
- env: PLATFORM=browser-edge
|
||||
|
||||
- env: PLATFORM=ios-11.3
|
||||
<<: *_ios
|
||||
- env: PLATFORM=ios-12.0
|
||||
<<: *_ios
|
||||
- env: PLATFORM=ios-12.2
|
||||
<<: *_ios
|
||||
|
||||
- env: PLATFORM=android-5.1
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-6.0
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-7.0
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-7.1
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-8.0
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-8.1
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-9.0
|
||||
<<: *_android
|
||||
|
||||
before_install:
|
||||
# manually install Node for `language: android`
|
||||
- if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi
|
||||
- node --version
|
||||
- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
|
||||
- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
|
||||
- npm install -g cordova
|
||||
# install paramedic if not running on paramedic repo
|
||||
- if ! [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then npm install -g github:apache/cordova-paramedic; fi
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
||||
before_script:
|
||||
- |
|
||||
if [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then
|
||||
# when used in the cordova-paramedic repo
|
||||
TEST_COMMAND="npm run eslint"
|
||||
PARAMEDIC_PLUGIN_TO_TEST="./spec/testable-plugin/"
|
||||
PARAMEDIC_COMMAND="node main.js"
|
||||
else
|
||||
# when used in any other (plugin) repo
|
||||
TEST_COMMAND="npm test"
|
||||
PARAMEDIC_PLUGIN_TO_TEST=$(pwd)
|
||||
PARAMEDIC_COMMAND="cordova-paramedic"
|
||||
fi
|
||||
- PARAMEDIC_BUILDNAME=travis-$TRAVIS_REPO_SLUG-$TRAVIS_JOB_NUMBER
|
||||
- |
|
||||
echo "Variables now are set to:"
|
||||
echo "TEST_COMMAND=$TEST_COMMAND"
|
||||
echo "ADDITIONAL_TESTS=$ADDITIONAL_TESTS"
|
||||
echo "PARAMEDIC_COMMAND=$PARAMEDIC_COMMAND"
|
||||
echo "PLATFORM=$PLATFORM"
|
||||
echo "PARAMEDIC_PLUGIN_TO_TEST=$PARAMEDIC_PLUGIN_TO_TEST"
|
||||
echo "PARAMEDIC_BUILDNAME=$PARAMEDIC_BUILDNAME"
|
||||
script:
|
||||
- $TEST_COMMAND
|
||||
- if [[ "$ADDITIONAL_TESTS_DIR" != "" ]]; then
|
||||
cd $ADDITIONAL_TESTS_DIR && npm install && npm test;
|
||||
else
|
||||
$PARAMEDIC_COMMAND --config ./pr/$PLATFORM --plugin $PARAMEDIC_PLUGIN_TO_TEST --buildName $PARAMEDIC_BUILDNAME;
|
||||
fi
|
||||
|
||||
119
README.md
119
README.md
@@ -21,20 +21,14 @@ description: Control the device status bar.
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | 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)|
|
||||
|AppVeyor|Travis CI|
|
||||
|:-:|:-:|
|
||||
|[](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-statusbar)|[](https://travis-ci.org/apache/cordova-plugin-statusbar)|
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
StatusBar
|
||||
======
|
||||
|
||||
> The `StatusBar` object provides some functions to customize the iOS and Android StatusBar.
|
||||
|
||||
:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Statusbar%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
This installation method requires cordova 5.0+
|
||||
@@ -53,30 +47,48 @@ Preferences
|
||||
|
||||
#### config.xml
|
||||
|
||||
- __StatusBarOverlaysWebView__ (boolean, defaults to true). On iOS 7, make the statusbar overlay or not overlay the WebView at startup.
|
||||
- __StatusBarOverlaysWebView__ (boolean, defaults to true). Make the statusbar overlay or not overlay the WebView at startup.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
- __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.
|
||||
##### Android Quirks
|
||||
|
||||
Only supported on Android 5 or later. Earlier versions will ignore this preference.
|
||||
|
||||
- __StatusBarBackgroundColor__ (color hex string, no default value). 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.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
- __StatusBarStyle__ (status bar style, defaults to lightcontent). On iOS 7, set the status bar style. 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, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
- __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.
|
||||
|
||||
<preference name="StatusBarDefaultScrollToTop" value="false" />
|
||||
|
||||
### Android Quirks
|
||||
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:
|
||||
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:
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
It is also possible to make the status bar semi-transparent. Android uses hexadecimal ARGB values, which are formatted as #AARRGGBB. That first pair of letters, the AA, represent the alpha channel. You must convert your decimal opacity values to a hexadecimal value. You can read more about it [here](https://stackoverflow.com/questions/5445085/understanding-colors-on-android-six-characters/11019879#11019879).
|
||||
|
||||
For example, a black status bar with 20% opacity:
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.backgroundColorByHexString('#33000000');
|
||||
}
|
||||
```
|
||||
|
||||
Hiding at startup
|
||||
-----------
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
@@ -113,32 +125,29 @@ Properties
|
||||
|
||||
- StatusBar.isVisible
|
||||
|
||||
Permissions
|
||||
-----------
|
||||
Events
|
||||
------
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
- statusTap
|
||||
|
||||
StatusBar.overlaysWebView
|
||||
=================
|
||||
|
||||
On iOS 7, make the statusbar overlay or not overlay the WebView.
|
||||
Make the statusbar overlay or not overlay the WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
|
||||
Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
- iOS 7+
|
||||
- Android 5+
|
||||
|
||||
Quick Example
|
||||
-------------
|
||||
@@ -158,9 +167,8 @@ Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Android 6+
|
||||
- Windows
|
||||
|
||||
StatusBar.styleLightContent
|
||||
=================
|
||||
@@ -174,9 +182,8 @@ Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Android 6+
|
||||
- Windows
|
||||
|
||||
StatusBar.styleBlackTranslucent
|
||||
=================
|
||||
@@ -190,9 +197,8 @@ Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Android 6+
|
||||
- Windows
|
||||
|
||||
StatusBar.styleBlackOpaque
|
||||
=================
|
||||
@@ -206,15 +212,14 @@ Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Android 6+
|
||||
- Windows
|
||||
|
||||
|
||||
StatusBar.backgroundColorByName
|
||||
=================
|
||||
|
||||
On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by color name.
|
||||
On iOS, when you set StatusBar.overlaysWebView to false, you can set the background color of the statusbar by color name.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
@@ -228,9 +233,7 @@ Supported Platforms
|
||||
|
||||
- iOS
|
||||
- Android 5+
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Windows
|
||||
|
||||
StatusBar.backgroundColorByHexString
|
||||
=================
|
||||
@@ -244,18 +247,16 @@ CSS shorthand properties are also supported.
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
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 iOS, when you set StatusBar.overlaysWebView 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
|
||||
On Android, when StatusBar.overlaysWebView is true, and on WP7&8, you can also specify values as #AARRGGBB, where AA is an alpha value.
|
||||
|
||||
Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
- Android 5+
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Windows
|
||||
|
||||
StatusBar.hide
|
||||
=================
|
||||
@@ -270,9 +271,7 @@ Supported Platforms
|
||||
|
||||
- iOS
|
||||
- Android
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Windows
|
||||
|
||||
StatusBar.show
|
||||
=================
|
||||
@@ -287,10 +286,7 @@ Supported Platforms
|
||||
|
||||
- iOS
|
||||
- Android
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
|
||||
- Windows
|
||||
|
||||
StatusBar.isVisible
|
||||
=================
|
||||
@@ -307,6 +303,19 @@ Supported Platforms
|
||||
|
||||
- iOS
|
||||
- Android
|
||||
- Windows Phone 7
|
||||
- Windows Phone 8
|
||||
- Windows Phone 8.1
|
||||
- Windows
|
||||
|
||||
statusTap
|
||||
=========
|
||||
|
||||
Listen for this event to know if the statusbar was tapped.
|
||||
|
||||
window.addEventListener('statusTap', function() {
|
||||
// scroll-up with document.body.scrollTop = 0; or do whatever you want
|
||||
});
|
||||
|
||||
|
||||
Supported Platforms
|
||||
-------------------
|
||||
|
||||
- iOS
|
||||
|
||||
@@ -20,6 +20,65 @@
|
||||
-->
|
||||
# Release Notes
|
||||
|
||||
### 2.4.3 (Jun 19, 2019)
|
||||
|
||||
- docs: Improved documentation and removed text that implies iOS only ([#130](https://github.com/apache/cordova-plugin-statusbar/issues/130)) ([`33e410a`](https://github.com/apache/cordova-plugin-statusbar/commit/33e410a), [`14b1513`](https://github.com/apache/cordova-plugin-statusbar/commit/14b1513))
|
||||
- docs: Alpha example doesn't match description ([#100](https://github.com/apache/cordova-plugin-statusbar/issues/100)) ([`5b77cae`](https://github.com/apache/cordova-plugin-statusbar/commit/5b77cae), [`9b5baa2`](https://github.com/apache/cordova-plugin-statusbar/commit/9b5baa2))
|
||||
- chore(types): remove version from types ([`fade76b`](https://github.com/apache/cordova-plugin-statusbar/commit/fade76b))
|
||||
- chore: fix github issues link ([`288bd71`](https://github.com/apache/cordova-plugin-statusbar/commit/288bd71))
|
||||
- docs: remove outdated translations ([`8dacefa`](https://github.com/apache/cordova-plugin-statusbar/commit/8dacefa))
|
||||
- build: add `.npmignore` to remove unneeded files from npm package ([`84081de`](https://github.com/apache/cordova-plugin-statusbar/commit/84081de))
|
||||
- build: add `.gitattributes` to force LF (instead of possible CRLF on Windows) ([`da6c2a8`](https://github.com/apache/cordova-plugin-statusbar/commit/da6c2a8))
|
||||
- ci(travis): Update Travis CI configuration for new paramedic ([#139](https://github.com/apache/cordova-plugin-statusbar/issues/139)) ([`a538bfe`](https://github.com/apache/cordova-plugin-statusbar/commit/a538bfe))
|
||||
- feat: update typings ([#132](https://github.com/apache/cordova-plugin-statusbar/issues/132)) ([`003fa61`](https://github.com/apache/cordova-plugin-statusbar/commit/003fa61))
|
||||
- chore: drop Node.js v4 support ([#124](https://github.com/apache/cordova-plugin-statusbar/issues/124)) ([`a07612a`](https://github.com/apache/cordova-plugin-statusbar/commit/a07612a))
|
||||
- chore(github): Add or update GitHub pull request and issue template ([`727eea3`](https://github.com/apache/cordova-plugin-statusbar/commit/727eea3))
|
||||
- docs: remove JIRA link ([`adcee9f`](https://github.com/apache/cordova-plugin-statusbar/commit/adcee9f))
|
||||
- ci(travis): also accept terms for android sdk `android-27` ([`c8a13b8`](https://github.com/apache/cordova-plugin-statusbar/commit/c8a13b8))
|
||||
- docs: remove second title headline ([`ecf8ccd`](https://github.com/apache/cordova-plugin-statusbar/commit/ecf8ccd))
|
||||
- docs: Add Android overlay support to README ([#97](https://github.com/apache/cordova-plugin-statusbar/issues/97)) ([`e0256b2`](https://github.com/apache/cordova-plugin-statusbar/commit/e0256b2), [`053a902`](https://github.com/apache/cordova-plugin-statusbar/commit/053a902))
|
||||
|
||||
|
||||
### 2.4.2 (Apr 12, 2018)
|
||||
* [CB-12679](https://issues.apache.org/jira/browse/CB-12679) Remove Permissions section
|
||||
|
||||
### 2.4.1 (Dec 27, 2017)
|
||||
* [CB-13712](https://issues.apache.org/jira/browse/CB-13712) (iOS): fix overlaysWebView reset on rotation (#92)
|
||||
|
||||
### 2.4.0 (Dec 15, 2017)
|
||||
* [CB-13623](https://issues.apache.org/jira/browse/CB-13623) (iOS): Remove **iOS** 6-7 code
|
||||
|
||||
### 2.3.0 (Nov 06, 2017)
|
||||
* [CB-13476](https://issues.apache.org/jira/browse/CB-13476) (iOS): handle double size statusbar on SDK 10 for **iOS 11**
|
||||
* [CB-13394](https://issues.apache.org/jira/browse/CB-13394) (iOS): fix `iPhone X` StatusBar rendering in landscape
|
||||
* [CB-11858](https://issues.apache.org/jira/browse/CB-11858) (android) Add `StatusBarStyle` feature support for **Android M+**
|
||||
* [CB-13311](https://issues.apache.org/jira/browse/CB-13311) (iOS) Statusbar does not overlay correctly on `iPhone X`
|
||||
* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor
|
||||
* [CB-12812](https://issues.apache.org/jira/browse/CB-12812) (browser) Fix statusbar plugin with **Browser** platform
|
||||
* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
|
||||
|
||||
### 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`
|
||||
* [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
|
||||
* [CB-11191](https://issues.apache.org/jira/browse/CB-11191) Statusbar plugin causing issues with webview size
|
||||
* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
|
||||
* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
|
||||
|
||||
### 2.2.0 (Sep 08, 2016)
|
||||
* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
|
||||
* Handle extended status bar on **iOS**
|
||||
@@ -66,7 +125,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
|
||||
|
||||
|
||||
276
doc/de/README.md
276
doc/de/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Das `StatusBar` Objekt stellt einige Funktionen zum Anpassen des iOS und Android StatusBar.
|
||||
|
||||
## Installation
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## "Einstellungen"
|
||||
|
||||
#### "config.xml"
|
||||
|
||||
* **StatusBarOverlaysWebView** (Boolean, der Standardwert ist True). Stellen Sie auf iOS 7 die Statusbar-Overlay oder keine Überlagerung der WebView beim Start.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (Farbe hex String, Standardwert ist #000000). Auf iOS legen 7 und Android 5, Sie die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) beim Start.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (Status Bar-Stil, der Standardwert ist Lightcontent). Legen Sie auf iOS 7 den Status-Bar-Stil. Verfügbaren Optionen Standard, Lightcontent, Blacktranslucent, Blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Android Eigenarten
|
||||
|
||||
Die Android 5 + Leitlinien angeben, verwenden eine andere Farbe für die Statusbar als Ihre Hauptanwendung Farbe (anders als die einheitliche Statusbar Farbe viele iOS 7 + apps), so Sie die Statusbar Farbe zur Laufzeit statt über `StatusBar.backgroundColorByHexString` oder `StatusBar.backgroundColorByName`festzulegen möchten vielleicht. Eine Möglichkeit dazu wäre:
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## Beim Start ausblenden
|
||||
|
||||
Während der Laufzeit können Sie die StatusBar.hide-Funktion unten, aber die StatusBar beim Start der app versteckt werden soll, müssen Sie Ihre app Info.plist Datei ändern.
|
||||
|
||||
Diese beiden Attribute hinzufügen/bearbeiten, wenn nicht vorhanden. Legen Sie **"Statusleiste ist anfangs ausgeblendet"** auf **"YES"** und **"View Controller-basierte Status Bar aussehen"** auf **"NO"**. Wenn Sie es manuell ohne Xcode bearbeiten, werden die Schlüssel und Werte:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Methoden
|
||||
|
||||
Dieses Plugin wird globales `StatusBar`-Objekt definiert.
|
||||
|
||||
Obwohl im globalen Gültigkeitsbereich, steht es nicht bis nach dem `deviceready`-Ereignis.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Eigenschaften
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Berechtigungen
|
||||
|
||||
#### "config.xml"
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
Stellen Sie auf iOS 7 Statusbar überlagern oder nicht überlagert die WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Beschreibung
|
||||
|
||||
Auf iOS 7 zu der Statusbar wie iOS 6 erscheinen auf False festgelegt. Legen Sie die Stil und Hintergrund Farbe entsprechend mit den anderen Funktionen.
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
|
||||
## Kurzes Beispiel
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Verwenden Sie die Standard-Statusbar (dunkle Text, für helle Hintergründe).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Verwenden Sie die LightContent-Statusbar (heller Text, für dunkle Hintergründe).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Verwenden Sie die BlackTranslucent-Statusbar (heller Text, für dunkle Hintergründe).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Verwenden Sie die BlackOpaque-Statusbar (heller Text, für dunkle Hintergründe).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von Farbnamen festlegen.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Unterstützte Farbnamen sind:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Legt die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge fest.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
CSS-Kurzschrift-Eigenschaften werden ebenfalls unterstützt.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) festlegen.
|
||||
|
||||
Auf WP7 und WP8 können Sie auch Werte wie #AARRGGBB, angeben wo AA einen alpha-Wert ist
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Ausblenden der Statusleiste.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Zeigt die Statusleiste.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Lesen Sie diese Eigenschaft, um festzustellen, ob die Statusbar sichtbar oder nicht ist.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
262
doc/de/index.md
262
doc/de/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Das `StatusBar` Objekt stellt einige Funktionen zum Anpassen des iOS und Android StatusBar.
|
||||
|
||||
## Installation
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## "Einstellungen"
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (Boolean, der Standardwert ist True). Stellen Sie auf iOS 7 die Statusbar-Overlay oder keine Überlagerung der WebView beim Start.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (Farbe hex String, der Standardwert ist #000000). Legen Sie auf iOS 7 die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) beim Start.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (Status Bar-Stil, der Standardwert ist Lightcontent). Legen Sie auf iOS 7 den Status-Bar-Stil. Verfügbaren Optionen Standard, Lightcontent, Blacktranslucent, Blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## Beim Start ausblenden
|
||||
|
||||
Während der Laufzeit können Sie die StatusBar.hide-Funktion unten, aber die StatusBar beim Start der app versteckt werden soll, müssen Sie Ihre app Info.plist Datei ändern.
|
||||
|
||||
Diese beiden Attribute hinzufügen/bearbeiten, wenn nicht vorhanden. Legen Sie **"Statusleiste ist anfangs ausgeblendet"** auf **"YES"** und **"View Controller-basierte Status Bar aussehen"** auf **"NO"**. Wenn Sie es manuell ohne Xcode bearbeiten, werden die Schlüssel und Werte:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Methoden
|
||||
|
||||
Dieses Plugin wird globales `StatusBar`-Objekt definiert.
|
||||
|
||||
Obwohl im globalen Gültigkeitsbereich, steht es nicht bis nach dem `deviceready`-Ereignis.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Eigenschaften
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Berechtigungen
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
Stellen Sie auf iOS 7 Statusbar überlagern oder nicht überlagert die WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Beschreibung
|
||||
|
||||
Auf iOS 7 zu der Statusbar wie iOS 6 erscheinen auf False festgelegt. Legen Sie die Stil und Hintergrund Farbe entsprechend mit den anderen Funktionen.
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
|
||||
## Kurzes Beispiel
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Verwenden Sie die Standard-Statusbar (dunkle Text, für helle Hintergründe).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Verwenden Sie die LightContent-Statusbar (heller Text, für dunkle Hintergründe).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Verwenden Sie die BlackTranslucent-Statusbar (heller Text, für dunkle Hintergründe).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Verwenden Sie die BlackOpaque-Statusbar (heller Text, für dunkle Hintergründe).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von Farbnamen festlegen.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Unterstützte Farbnamen sind:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Legt die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge fest.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
CSS-Kurzschrift-Eigenschaften werden ebenfalls unterstützt.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Auf iOS 7 Wenn Sie StatusBar.statusBarOverlaysWebView auf False festlegen, können Sie die Hintergrundfarbe der Statusbar von eine hexadezimale Zeichenfolge (#RRGGBB) festlegen.
|
||||
|
||||
Auf WP7 und WP8 können Sie auch Werte wie #AARRGGBB, angeben wo AA einen alpha-Wert ist
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Ausblenden der Statusleiste.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Zeigt die Statusleiste.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Lesen Sie diese Eigenschaft, um festzustellen, ob die Statusbar sichtbar oder nicht ist.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Unterstützte Plattformen
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone-8.1
|
||||
276
doc/es/README.md
276
doc/es/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> El `StatusBar` objeto proporciona algunas funciones para personalizar el iOS y Android StatusBar.
|
||||
|
||||
## Instalación
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Preferencias
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, true por defecto). En iOS 7, hacer la superposición statusbar o no superponer la WebView al inicio.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (color hex string por defecto #000000). IOS 7 y 5 Android, configurar el color de fondo de la barra de estado por una cadena hexadecimal (#RRGGBB) en el arranque.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (status bar estilo por defecto lightcontent). En iOS 7, definir el estilo de barra de estado. Por defecto las opciones disponibles, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Rarezas Android
|
||||
|
||||
Android 5 + pautas especifican utilizando un color diferente para la barra de estado que la aplicación principal de color (a diferencia del color de barra de estado uniforme de muchas apps de iOS 7 +), por lo que puede establecer el color de la barra de estado en tiempo de ejecución en su lugar a través de `StatusBar.backgroundColorByHexString` o `StatusBar.backgroundColorByName`. Una forma de hacerlo sería:
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## Escondido en el arranque
|
||||
|
||||
Durante el tiempo de ejecución puede utilizar la función StatusBar.hide abajo, pero si quieres la barra de estado que está escondido en el inicio de la aplicación, se debe modificar el archivo Info.plist de su aplicación.
|
||||
|
||||
Agregar/editar estos dos atributos si no está presente. Defina **"inicialmente se esconde la barra de estado"** a **"YES"** y **"Aparición de vista basado en controlador estatus bar"** a **"NO"**. Si se edita manualmente sin Xcode, las claves y valores son:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Métodos
|
||||
|
||||
Este plugin define global `StatusBar` objeto.
|
||||
|
||||
Aunque en el ámbito global, no estará disponible hasta después de la `deviceready` evento.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Propiedades
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Permisos
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
En iOS 7, hacer la barra de estado superposición o no superponer la vista Web.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Descripción
|
||||
|
||||
En iOS 7, establecida en false para que la barra de estado aparezca como iOS 6. Establece el color de fondo y estilo para utilizar las otras funciones.
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
|
||||
## Ejemplo rápido
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Utilice la barra de estado por defecto (texto oscuro, para fondos de luz).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Utilice la barra de estado lightContent (texto ligero, para fondos oscuros).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Utilice la barra de estado blackTranslucent (texto ligero, para fondos oscuros).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Utilice la barra de estado blackOpaque (texto ligero, para fondos oscuros).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
En iOS 7, al establecer StatusBar.statusBarOverlaysWebView a false, se puede establecer el color de fondo de la barra de estado nombre del color.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Nombres de los colores admitidos son:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Establece el color de fondo de la barra de estado por una cadena hexadecimal.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Propiedades CSS abreviada también son compatibles.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
En iOS 7, cuando se establece StatusBar.statusBarOverlaysWebView en false, se puede establecer el color de fondo de la barra de estado una cadena hexadecimal (#RRGGBB).
|
||||
|
||||
En WP7 y WP8 también puede especificar valores como #AARRGGBB, donde AA es un valor alfa
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Ocultar la barra de estado.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Muestra la barra de estado.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Lea esta propiedad para ver si la barra de estado es visible o no.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
252
doc/es/index.md
252
doc/es/index.md
@@ -1,252 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> El `StatusBar` objeto proporciona algunas funciones para personalizar el iOS y Android StatusBar.
|
||||
|
||||
## Instalación
|
||||
|
||||
Cordova plugin agregar cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Preferencias
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, true por defecto). En iOS 7, hacer la superposición statusbar o no superponer la WebView al inicio.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (cadena hexadecimal color, #000000 por defecto). En iOS 7, establecer el color de fondo de la barra de estado por una cadena hexadecimal (#RRGGBB) en el arranque.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (status bar estilo por defecto lightcontent). En iOS 7, definir el estilo de barra de estado. Por defecto las opciones disponibles, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## Escondido en el arranque
|
||||
|
||||
Durante el tiempo de ejecución puede utilizar la función StatusBar.hide abajo, pero si quieres la barra de estado que está escondido en el inicio de la aplicación, se debe modificar el archivo Info.plist de su aplicación.
|
||||
|
||||
Agregar/editar estos dos atributos si no está presente. Defina **"inicialmente se esconde la barra de estado"** a **"YES"** y **"Aparición de vista basado en controlador estatus bar"** a **"NO"**. Si se edita manualmente sin Xcode, las claves y valores son:
|
||||
|
||||
< llave > UIStatusBarHidden < / key >< verdadero / >< llave > UIViewControllerBasedStatusBarAppearance < / key >< falso / >
|
||||
|
||||
|
||||
## Métodos
|
||||
|
||||
Este plugin define global `StatusBar` objeto.
|
||||
|
||||
Aunque en el ámbito global, no estará disponible hasta después de la `deviceready` evento.
|
||||
|
||||
document.addEventListener ("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {console.log(StatusBar)};
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Propiedades
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Permisos
|
||||
|
||||
#### config.xml
|
||||
|
||||
< nombre de la función = "StatusBar" >< nombre param = "ios-paquete" value = "CDVStatusBar" onload = "true" / >< / característica >
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
En iOS 7, hacer la barra de estado superposición o no superponer la vista Web.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Descripción
|
||||
|
||||
En iOS 7, establecida en false para que la barra de estado aparezca como iOS 6. Establece el color de fondo y estilo para utilizar las otras funciones.
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
|
||||
## Ejemplo rápido
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Utilice la barra de estado por defecto (texto oscuro, para fondos de luz).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Utilice la barra de estado lightContent (texto ligero, para fondos oscuros).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Utilice la barra de estado blackTranslucent (texto ligero, para fondos oscuros).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Utilice la barra de estado blackOpaque (texto ligero, para fondos oscuros).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
En iOS 7, al establecer StatusBar.statusBarOverlaysWebView a false, se puede establecer el color de fondo de la barra de estado nombre del color.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Nombres de los colores admitidos son:
|
||||
|
||||
negro, gris oscuro, lightGray, blanco, gris, rojo, verde, azul, cian, amarillo, magenta, naranja, púrpura, marrón
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Establece el color de fondo de la barra de estado por una cadena hexadecimal.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Propiedades CSS abreviada también son compatibles.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); = > StatusBar.backgroundColorByHexString("#FAB") #333333; = > #FFAABB
|
||||
|
||||
|
||||
En iOS 7, cuando se establece StatusBar.statusBarOverlaysWebView en false, se puede establecer el color de fondo de la barra de estado una cadena hexadecimal (#RRGGBB).
|
||||
|
||||
En WP7 y WP8 también puede especificar valores como #AARRGGBB, donde AA es un valor alfa
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Ocultar la barra de estado.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Muestra la barra de estado.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Lea esta propiedad para ver si la barra de estado es visible o no.
|
||||
|
||||
Si (StatusBar.isVisible) {/ / hacer algo}
|
||||
|
||||
|
||||
## Plataformas soportadas
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
276
doc/fr/README.md
276
doc/fr/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Le `StatusBar` objet fournit quelques fonctions pour personnaliser les iOS et Android StatusBar.
|
||||
|
||||
## Installation
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Préférences
|
||||
|
||||
#### config.Xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, la valeur par défaut true). Sur iOS 7, faire la superposition de statusbar ou pas superposition le WebView au démarrage.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (chaîne hexadécimale de couleur, par défaut, #000000). Sur iOS 7 et 5 Android, définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB) au démarrage.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (style de barre de statut, par défaut, lightcontent). Sur iOS 7, définir le style de barre de statut. Par défaut les options disponibles, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Quirks Android
|
||||
|
||||
Les lignes directrices 5 + Android spécifient à l'aide d'une couleur différente pour la barre d'État à votre application principale couleur (contrairement à la couleur uniforme statusbar de nombreuses applications iOS 7 +), donc vous pouvez définir la couleur de la barre d'état lors de l'exécution au lieu de cela via `StatusBar.backgroundColorByHexString` ou `StatusBar.backgroundColorByName`. Une façon de le faire serait :
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## Cacher au démarrage
|
||||
|
||||
Pendant l'exécution, vous pouvez utiliser la fonction StatusBar.hide en bas, mais si vous souhaitez que la barre d'État pour être caché au démarrage de l'application, vous devez modifier le fichier Info.plist de votre application.
|
||||
|
||||
Ajouter/modifier ces deux attributs si n'est pas présent. **"Barre d'État est initialement masqué"** la valeur **"** Yes" et **"À l'apparence vue sur contrôleur statut bar"** la valeur **"Non"**. Si vous modifiez manuellement sans Xcode, les clés et les valeurs sont :
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Méthodes
|
||||
|
||||
Ce plugin définit objet `StatusBar` global.
|
||||
|
||||
Bien que dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Propriétés
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Autorisations
|
||||
|
||||
#### config.Xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
Sur iOS 7, faire la statusbar superposition ou pas superposer le WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
Sur iOS 7, la valeur false pour afficher la barre d'État comme iOS 6. Définissez la couleur de style et d'arrière-plan en fonction de l'utilisation des autres fonctions.
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
|
||||
## Exemple court
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Utilisez la barre de statut par défaut (texte sombre, pour les arrière-plans lumineux).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Utilisez la barre d'État lightContent (texte clair, des arrière-plans sombres).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Utilisez la barre d'État blackTranslucent (texte clair, des arrière-plans sombres).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Utilisez la barre d'État blackOpaque (texte clair, des arrière-plans sombres).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par nom de couleur.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Les noms de couleurs prises en charge sont :
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Définit la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Propriétés de raccourci CSS sont également pris en charge.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB).
|
||||
|
||||
Sur WP7 et WP8, vous pouvez également spécifier des valeurs comme #AARRGGBB, où AA représente une valeur alpha
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Masquer la barre d'État.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Affiche la barre d'État.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Lire cette propriété afin de voir si la barre d'État est visible ou non.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
262
doc/fr/index.md
262
doc/fr/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Le `StatusBar` objet fournit quelques fonctions pour personnaliser les iOS et Android StatusBar.
|
||||
|
||||
## Installation
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Préférences
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, la valeur par défaut true). Sur iOS 7, faire la superposition de statusbar ou pas superposition le WebView au démarrage.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (chaîne hexadécimale de couleur, par défaut, #000000). Sur iOS 7, définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB) au démarrage.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (style de barre de statut, par défaut, lightcontent). Sur iOS 7, définir le style de barre de statut. Par défaut les options disponibles, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## Cacher au démarrage
|
||||
|
||||
Pendant l'exécution, vous pouvez utiliser la fonction StatusBar.hide en bas, mais si vous souhaitez que la barre d'État pour être caché au démarrage de l'application, vous devez modifier le fichier Info.plist de votre application.
|
||||
|
||||
Ajouter/modifier ces deux attributs si n'est pas présent. **"Barre d'État est initialement masqué"** la valeur **"** Yes" et **"À l'apparence vue sur contrôleur statut bar"** la valeur **"Non"**. Si vous modifiez manuellement sans Xcode, les clés et les valeurs sont :
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Méthodes
|
||||
|
||||
Ce plugin définit objet `StatusBar` global.
|
||||
|
||||
Bien que dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Propriétés
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Autorisations
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
Sur iOS 7, faire la statusbar superposition ou pas superposer le WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
Sur iOS 7, la valeur false pour afficher la barre d'État comme iOS 6. Définissez la couleur de style et d'arrière-plan en fonction de l'utilisation des autres fonctions.
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
|
||||
## Exemple court
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Utilisez la barre de statut par défaut (texte sombre, pour les arrière-plans lumineux).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Utilisez la barre d'État lightContent (texte clair, des arrière-plans sombres).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Utilisez la barre d'État blackTranslucent (texte clair, des arrière-plans sombres).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Utilisez la barre d'État blackOpaque (texte clair, des arrière-plans sombres).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par nom de couleur.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Les noms de couleurs prises en charge sont :
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Définit la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Propriétés de raccourci CSS sont également pris en charge.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Sur iOS 7, lorsque vous définissez StatusBar.statusBarOverlaysWebView sur false, vous pouvez définir la couleur d'arrière-plan de la barre d'État par une chaîne hexadécimale (#RRGGBB).
|
||||
|
||||
Sur WP7 et WP8, vous pouvez également spécifier des valeurs comme #AARRGGBB, où AA représente une valeur alpha
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Masquer la barre d'État.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Affiche la barre d'État.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Plates-formes prises en charge
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Lire cette propriété afin de voir si la barre d'État est visible ou non.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Plates-formes supportées
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
276
doc/it/README.md
276
doc/it/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Il `StatusBar` oggetto fornisce alcune funzioni per personalizzare l'iOS e Android StatusBar.
|
||||
|
||||
## Installazione
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Preferenze
|
||||
|
||||
#### config. XML
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, default è true). IOS 7, rendono la statusbar sovrapposizione o la non sovrapposizione WebView all'avvio.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (stringa esadecimale di colore, il valore predefinito è #000000). Su iOS 7 e 5 Android, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB) all'avvio.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (status bar in stile, default è lightcontent). IOS 7, impostare lo stile di barra di stato. Predefinita di opzioni disponibili, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Stranezze Android
|
||||
|
||||
Le linee 5 + Android Guida specificano utilizzando un colore diverso per la barra di stato che l'app principale di colore (a differenza di colore uniforme statusbar di molte applicazioni di iOS 7 +), quindi si consiglia di impostare il colore della barra di stato in fase di esecuzione invece tramite `StatusBar.backgroundColorByHexString` o `StatusBar.backgroundColorByName`. Un modo per farlo sarebbe:
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## Nascondendo all'avvio
|
||||
|
||||
In fase di esecuzione è possibile utilizzare la funzione di StatusBar.hide qui sotto, ma se si desidera che la barra di stato venga nascosta all'avvio di app, è necessario modificare il file info. plist dell'app.
|
||||
|
||||
Aggiungere o modificare questi due attributi, se non presente. Impostare la **"barra di stato è inizialmente nascosto"** a **"YES"** e **"Aspetto di vista basati su controller status bar"** a **"NO"**. Se si modifica manualmente senza Xcode, le chiavi e i valori sono:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Metodi
|
||||
|
||||
Questo plugin definisce globale oggetto `StatusBar`.
|
||||
|
||||
Anche se in ambito globale, non è disponibile fino a dopo l'evento `deviceready`.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Proprietà
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Autorizzazioni
|
||||
|
||||
#### config. XML
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
IOS 7, rendono la statusbar sovrapposizione o non sovrapporre WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Descrizione
|
||||
|
||||
IOS 7, impostato su false per rendere la barra di stato vengono visualizzati come iOS 6. Impostare il colore di sfondo e stile per soddisfare utilizzando altre funzioni.
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
|
||||
## Esempio rapido
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Utilizzare la barra di stato predefinito (testo scuro, per sfondi di luce).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Utilizzare la barra di stato lightContent (testo in chiaro, per sfondi scuri).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Utilizzare la barra di stato blackTranslucent (testo in chiaro, per sfondi scuri).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Utilizzare la barra di stato blackOpaque (testo in chiaro, per sfondi scuri).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato con il nome di colore.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Nomi di colore supportati sono:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Imposta il colore di sfondo della barra di stato di una stringa esadecimale.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Proprietà di scrittura stenografica CSS sono supportati anche.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB).
|
||||
|
||||
Su WP7 e WP8 è inoltre possibile specificare i valori come #AARRGGBB, dove AA è un valore alfa
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Nascondere la barra di stato.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Mostra la barra di stato.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Leggere questa proprietà per vedere se la barra di stato è visibile o no.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
262
doc/it/index.md
262
doc/it/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Il `StatusBar` oggetto fornisce alcune funzioni per personalizzare l'iOS e Android StatusBar.
|
||||
|
||||
## Installazione
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Preferenze
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, default è true). IOS 7, rendono la statusbar sovrapposizione o la non sovrapposizione WebView all'avvio.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (stringa esadecimale colore, predefinito è #000000). IOS 7, impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB) all'avvio.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (status bar in stile, default è lightcontent). IOS 7, impostare lo stile di barra di stato. Predefinita di opzioni disponibili, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## Nascondendo all'avvio
|
||||
|
||||
In fase di esecuzione è possibile utilizzare la funzione di StatusBar.hide qui sotto, ma se si desidera che la barra di stato venga nascosta all'avvio di app, è necessario modificare il file info. plist dell'app.
|
||||
|
||||
Aggiungere o modificare questi due attributi, se non presente. Impostare la **"barra di stato è inizialmente nascosto"** a **"YES"** e **"Aspetto di vista basati su controller status bar"** a **"NO"**. Se si modifica manualmente senza Xcode, le chiavi e i valori sono:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Metodi
|
||||
|
||||
Questo plugin definisce globale oggetto `StatusBar`.
|
||||
|
||||
Anche se in ambito globale, non è disponibile fino a dopo l'evento `deviceready`.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Proprietà
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Autorizzazioni
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
IOS 7, rendono la statusbar sovrapposizione o non sovrapporre WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Descrizione
|
||||
|
||||
IOS 7, impostato su false per rendere la barra di stato vengono visualizzati come iOS 6. Impostare il colore di sfondo e stile per soddisfare utilizzando altre funzioni.
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
|
||||
## Esempio rapido
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Utilizzare la barra di stato predefinito (testo scuro, per sfondi di luce).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Utilizzare la barra di stato lightContent (testo in chiaro, per sfondi scuri).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Utilizzare la barra di stato blackTranslucent (testo in chiaro, per sfondi scuri).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Utilizzare la barra di stato blackOpaque (testo in chiaro, per sfondi scuri).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato con il nome di colore.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Nomi di colore supportati sono:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Imposta il colore di sfondo della barra di stato di una stringa esadecimale.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Proprietà di scrittura stenografica CSS sono supportati anche.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
IOS 7, quando StatusBar.statusBarOverlaysWebView è impostata su false, è possibile impostare il colore di sfondo della barra di stato di una stringa esadecimale (#RRGGBB).
|
||||
|
||||
Su WP7 e WP8 è inoltre possibile specificare i valori come #AARRGGBB, dove AA è un valore alfa
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Nascondere la barra di stato.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Mostra la barra di stato.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Leggere questa proprietà per vedere se la barra di stato è visibile o no.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Piattaforme supportate
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
276
doc/ja/README.md
276
doc/ja/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`オブジェクトは、iOS と Android ステータス バーをカスタマイズするいくつかの機能を提供します。
|
||||
|
||||
## インストール
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## 基本設定
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView**(ブール値、デフォルトは true)。IOS 7、起動時にステータスバー オーバーレイまたはないオーバーレイ、WebView を作る。
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor**(カラー 16 進文字列、既定値は #000000)。IOS 7 とアンドロイド 5、16 進文字列 (#RRGGBB) 起動時にステータスバーの背景色を設定します。
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle**(ステータス バーのスタイル、既定値は lightcontent)。Ios 7、ステータス バーのスタイルを設定します。使用可能なオプションのデフォルト、lightcontent、blacktranslucent、blackopaque。
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Android の癖
|
||||
|
||||
Android のガイドライン 5 + 指定メイン アプリよりもステータスバーの異なる色を使用して`StatusBar.backgroundColorByHexString`または`StatusBar.backgroundColorByName`経由で代わりに実行時にステータス バーの色を設定する場合がありますので (とは違って制服ステータスバー色多くの iOS 7 + アプリの) 色します。 それを行う方法の 1 つになります。
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## 起動時に非表示
|
||||
|
||||
実行時に下に、StatusBar.hide 関数を使用できますが、StatusBar アプリ起動時に非表示にする場合は、アプリの Info.plist ファイルを変更する必要があります。
|
||||
|
||||
これら 2 つの属性の追加/編集存在しない場合。 **「ステータス バーが非表示最初」** **"YES"**を設定し、 **「ビュー コント ローラー ベースのステータス バーの外観」** **"NO"**にします。 Xcode せず手動で編集する、キーと値は。
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## メソッド
|
||||
|
||||
このプラグインでは、グローバル `StatusBar` オブジェクトを定義します。
|
||||
|
||||
グローバル スコープではあるがそれがないまで `deviceready` イベントの後です。
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## プロパティ
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## アクセス許可
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
IOS 7、statusbar オーバーレイまたはない WebView をオーバーレイします。
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## 解説
|
||||
|
||||
IOS 7、iOS の 6 のように表示されるステータスバーを false に設定します。他の関数の使用に合わせてスタイルや背景色を設定します。
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
|
||||
## 簡単な例
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
既定ステータス バー (暗いテキスト、淡色の背景) を使用します。
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
LightContent ステータスバー (暗い背景の明るいテキスト) を使用します。
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
BlackTranslucent ステータスバー (暗い背景の明るいテキスト) を使用します。
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
BlackOpaque ステータスバー (暗い背景の明るいテキスト) を使用します。
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Ios 7、StatusBar.statusBarOverlaysWebView を false に設定する場合はステータスバーの背景色の色の名前によって設定できます。
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
サポートされている色の名前は次のとおりです。
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
16 進文字列をステータス バーの背景色を設定します。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
速記の CSS プロパティもサポートされています。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Ios 7、StatusBar.statusBarOverlaysWebView を false に設定する場合はステータスバーの背景色を 16 進文字列 (#RRGGBB) で設定できます。
|
||||
|
||||
WP7 と WP8 も指定できます値 #AARRGGBB, AA は、アルファ値として
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
ステータスバーを隠します。
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* アンドロイド
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
ステータス バーが表示されます。
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* アンドロイド
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
このプロパティ、ステータスバーが表示されるかどうかをお読みください。
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* アンドロイド
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
262
doc/ja/index.md
262
doc/ja/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`オブジェクトは、iOS と Android ステータス バーをカスタマイズするいくつかの機能を提供します。
|
||||
|
||||
## インストール
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## 基本設定
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView**(ブール値、デフォルトは true)。IOS 7、起動時にステータスバー オーバーレイまたはないオーバーレイ、WebView を作る。
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor**(色 16 進文字列、デフォルトは # 000000)。Ios 7、起動時に 16 進文字列 (#RRGGBB) でステータス バーの背景色を設定します。
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle**(ステータス バーのスタイル、既定値は lightcontent)。Ios 7、ステータス バーのスタイルを設定します。使用可能なオプションのデフォルト、lightcontent、blacktranslucent、blackopaque。
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## 起動時に非表示
|
||||
|
||||
実行時に下に、StatusBar.hide 関数を使用できますが、StatusBar アプリ起動時に非表示にする場合は、アプリの Info.plist ファイルを変更する必要があります。
|
||||
|
||||
これら 2 つの属性の追加/編集存在しない場合。 **「ステータス バーが非表示最初」** **"YES"**を設定し、 **「ビュー コント ローラー ベースのステータス バーの外観」** **"NO"**にします。 Xcode せず手動で編集する、キーと値は。
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## メソッド
|
||||
|
||||
このプラグインでは、グローバル `StatusBar` オブジェクトを定義します。
|
||||
|
||||
グローバル スコープではあるがそれがないまで `deviceready` イベントの後です。
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## プロパティ
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## アクセス許可
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
IOS 7、statusbar オーバーレイまたはない WebView をオーバーレイします。
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## 解説
|
||||
|
||||
IOS 7、iOS の 6 のように表示されるステータスバーを false に設定します。他の関数の使用に合わせてスタイルや背景色を設定します。
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
|
||||
## 簡単な例
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
既定ステータス バー (暗いテキスト、淡色の背景) を使用します。
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
LightContent ステータスバー (暗い背景の明るいテキスト) を使用します。
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
BlackTranslucent ステータスバー (暗い背景の明るいテキスト) を使用します。
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
BlackOpaque ステータスバー (暗い背景の明るいテキスト) を使用します。
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Ios 7、StatusBar.statusBarOverlaysWebView を false に設定する場合はステータスバーの背景色の色の名前によって設定できます。
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
サポートされている色の名前は次のとおりです。
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
16 進文字列をステータス バーの背景色を設定します。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
速記の CSS プロパティもサポートされています。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Ios 7、StatusBar.statusBarOverlaysWebView を false に設定する場合はステータスバーの背景色を 16 進文字列 (#RRGGBB) で設定できます。
|
||||
|
||||
WP7 と WP8 も指定できます値 #AARRGGBB, AA は、アルファ値として
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
ステータスバーを隠します。
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* アンドロイド
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
ステータス バーが表示されます。
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* アンドロイド
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
このプロパティ、ステータスバーが表示されるかどうかをお読みください。
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## サポートされているプラットフォーム
|
||||
|
||||
* iOS
|
||||
* アンドロイド
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
276
doc/ko/README.md
276
doc/ko/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`개체 iOS와 안 드 로이드 상태 표시줄을 사용자 지정 하려면 몇 가지 기능을 제공 합니다.
|
||||
|
||||
## 설치
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## 환경 설정
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, 기본값: true)입니다. IOS 7, 시작 시 상태 표시줄 오버레이 또는 WebView 중첩 되지 확인 합니다.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (색상 16 진수 문자열 기본값: #000000). IOS에서 7과 안 드 로이드 5 시작 시 16 진수 문자열 (#RRGGBB) 상태 표시줄의 배경색을 설정 합니다.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (상태 표시줄 스타일, 기본값: lightcontent). Ios 7, 상태 표시줄 스타일을 설정 합니다. 사용 가능한 옵션 기본, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### 안 드 로이드 단점
|
||||
|
||||
안 드 로이드 5 + 지침 보다 귀하의 주요 응용 프로그램 상태 표시줄에 대 한 다른 색을 사용 하 여 지정한 색상 (와 달리 균일 한 상태 표시줄의 색상 많은 iOS 7 + 애플 리 케이 션), `StatusBar.backgroundColorByHexString` 또는 `StatusBar.backgroundColorByName`를 통해 대신 런타임에 상태 표시줄 색을 설정 하고자 할 수 있습니다. 한 가지 방법은 일 것입니다.
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## 시작 시 숨기기
|
||||
|
||||
런타임 동안 아래의 StatusBar.hide 함수를 사용할 수 있습니다 하지만 당신이 원하는 응용 프로그램 시작 시 숨겨진 상태 표시줄, 응용 프로그램의 Info.plist 파일 수정 해야 합니다.
|
||||
|
||||
추가 편집이 두 특성이 없는 경우. **"상태 표시줄 처음 숨겨진"** **"YES"** 로 설정 하 고 **"뷰 컨트롤러 기반 상태 표시줄 모양"** **"NO"**로 설정 합니다. Xcode, 열쇠 없이 수동으로 편집 하는 경우 값은:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## 메서드
|
||||
|
||||
이 플러그인 글로벌 `StatusBar` 개체를 정의합니다.
|
||||
|
||||
전역 범위에 있지만 그것은 불가능까지 `deviceready` 이벤트 후.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## 속성
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## 사용 권한
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
IOS 7, 오버레이 또는 하지 WebView 중첩 상태 표시줄을 확인 합니다.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## 설명
|
||||
|
||||
7 iOS, iOS 6 처럼 나타나는 상태 표시줄을 false로 설정 합니다. 다른 함수를 사용 하 여에 맞게 스타일과 배경 색상을 설정 합니다.
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
|
||||
## 빠른 예제
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
기본 상태 표시줄 (어두운 텍스트, 밝은 배경에 대 한)를 사용 합니다.
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
LightContent 상태 표시줄 (어두운 배경에 대 한 가벼운 텍스트)을 사용 합니다.
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
BlackTranslucent 상태 표시줄 (어두운 배경에 대 한 가벼운 텍스트)을 사용 합니다.
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
BlackOpaque 상태 표시줄 (어두운 배경에 대 한 가벼운 텍스트)을 사용 합니다.
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Ios 7, StatusBar.statusBarOverlaysWebView을 false로 설정 하면 설정할 수 있는 상태 표시줄의 배경색 색상 이름으로.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
지원 되는 색 이름입니다.
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
16 진수 문자열 상태 표시줄의 배경색을 설정합니다.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
CSS 대표 속성 지원 됩니다.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Ios 7, StatusBar.statusBarOverlaysWebView을 false로 설정 하면 설정할 수 있는 상태 표시줄의 배경색 16 진수 문자열 (#RRGGBB)에 의해.
|
||||
|
||||
WP7 및 WP8에 당신은 또한 #AARRGGBB, AA는 알파 값으로 값을 지정할 수 있습니다.
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
숨기기 상태 표시줄.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* 안 드 로이드
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
상태 표시줄을 표시합니다.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* 안 드 로이드
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
이 속성을 상태 표시줄 표시 되는 경우 읽기.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* 안 드 로이드
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
262
doc/ko/index.md
262
doc/ko/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`개체 iOS와 안 드 로이드 상태 표시줄을 사용자 지정 하려면 몇 가지 기능을 제공 합니다.
|
||||
|
||||
## 설치
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## 환경 설정
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, 기본값: true)입니다. IOS 7, 시작 시 상태 표시줄 오버레이 또는 WebView 중첩 되지 확인 합니다.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (색상 16 진수 문자열 기본값: #000000). Ios 7, 시작 시 16 진수 문자열 (#RRGGBB) 상태 표시줄의 배경색을 설정 합니다.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (상태 표시줄 스타일, 기본값: lightcontent). Ios 7, 상태 표시줄 스타일을 설정 합니다. 사용 가능한 옵션 기본, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## 시작 시 숨기기
|
||||
|
||||
런타임 동안 아래의 StatusBar.hide 함수를 사용할 수 있습니다 하지만 당신이 원하는 응용 프로그램 시작 시 숨겨진 상태 표시줄, 응용 프로그램의 Info.plist 파일 수정 해야 합니다.
|
||||
|
||||
추가 편집이 두 특성이 없는 경우. **"상태 표시줄 처음 숨겨진"** **"YES"** 로 설정 하 고 **"뷰 컨트롤러 기반 상태 표시줄 모양"** **"NO"**로 설정 합니다. Xcode, 열쇠 없이 수동으로 편집 하는 경우 값은:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## 메서드
|
||||
|
||||
이 플러그인 글로벌 `StatusBar` 개체를 정의합니다.
|
||||
|
||||
전역 범위에 있지만 그것은 불가능까지 `deviceready` 이벤트 후.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## 속성
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## 사용 권한
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
IOS 7, 오버레이 또는 하지 WebView 중첩 상태 표시줄을 확인 합니다.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## 설명
|
||||
|
||||
7 iOS, iOS 6 처럼 나타나는 상태 표시줄을 false로 설정 합니다. 다른 함수를 사용 하 여에 맞게 스타일과 배경 색상을 설정 합니다.
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
|
||||
## 빠른 예제
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
기본 상태 표시줄 (어두운 텍스트, 밝은 배경에 대 한)를 사용 합니다.
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
LightContent 상태 표시줄 (어두운 배경에 대 한 가벼운 텍스트)을 사용 합니다.
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
BlackTranslucent 상태 표시줄 (어두운 배경에 대 한 가벼운 텍스트)을 사용 합니다.
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
BlackOpaque 상태 표시줄 (어두운 배경에 대 한 가벼운 텍스트)을 사용 합니다.
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Ios 7, StatusBar.statusBarOverlaysWebView을 false로 설정 하면 설정할 수 있는 상태 표시줄의 배경색 색상 이름으로.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
지원 되는 색 이름입니다.
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
16 진수 문자열 상태 표시줄의 배경색을 설정합니다.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
CSS 대표 속성 지원 됩니다.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Ios 7, StatusBar.statusBarOverlaysWebView을 false로 설정 하면 설정할 수 있는 상태 표시줄의 배경색 16 진수 문자열 (#RRGGBB)에 의해.
|
||||
|
||||
WP7 및 WP8에 당신은 또한 #AARRGGBB, AA는 알파 값으로 값을 지정할 수 있습니다.
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
숨기기 상태 표시줄.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* 안 드 로이드
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
상태 표시줄을 표시합니다.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* 안 드 로이드
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
이 속성을 상태 표시줄 표시 되는 경우 읽기.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## 지원 되는 플랫폼
|
||||
|
||||
* iOS
|
||||
* 안 드 로이드
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
276
doc/pl/README.md
276
doc/pl/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`Obiekt zawiera kilka funkcji, aby dostosować iOS i Android StatusBar.
|
||||
|
||||
## Instalacja
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Preferencje
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, domyślnie na wartość true). Na iOS 7 zrobić nakładki stanu lub nie nakładki widoku sieci Web podczas uruchamiania.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (kolor ciąg szesnastkowy, domyślnie #000000). Na iOS 7 i Android 5 kolor tła stanu przez ciąg szesnastkowy (#RRGGBB) przy starcie systemu.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (stan styl paska, domyślnie lightcontent.) Na iOS 7 ustawić styl paska stanu. Dostępne opcje domyślne, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Dziwactwa Androida
|
||||
|
||||
Android 5 + wytyczne określają przy użyciu różnych kolorów statusbar niż główne aplikacji kolor (w przeciwieństwie do stanu jednolitych kolorów wiele aplikacje iOS 7 +), więc może chcesz ustawić kolor pasek stanu w czasie wykonywania zamiast za pośrednictwem `StatusBar.backgroundColorByHexString` lub `StatusBar.backgroundColorByName`. Jednym sposobem na to byłoby:
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## Przy starcie
|
||||
|
||||
Podczas uruchamiania można użyć funkcji StatusBar.hide poniżej, ale jeśli chcesz StatusBar ukryty w uruchamiania aplikacji, należy zmodyfikować plik Info.plist Twojej aplikacji.
|
||||
|
||||
Dodawanie/edycja tych dwóch atrybutów jeśli nie obecny. Ustawianie **"pasek stanu jest początkowo ukryte"** na **"Tak"** i **"Oparte na kontroler stanu paska wygląd"** na **"Nie"**. Jeśli możesz go edytować ręcznie bez Xcode, kluczy i wartości są:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Metody
|
||||
|
||||
Ten plugin definiuje obiekt globalny `StatusBar`.
|
||||
|
||||
Chociaż w globalnym zasięgu, to nie dostępne dopiero po `deviceready` imprezie.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Właściwości
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Uprawnienia
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
Na iOS 7 zrobić statusbar nakładki lub nie nakładka widoku sieci Web.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Opis
|
||||
|
||||
Na iOS 7 zestaw do false, aby na pasku stanu pojawia się jak iOS 6. Ustaw kolor tła i styl do korzystania z innych funkcji.
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
|
||||
## Szybki przykład
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Użyj domyślnego stanu (ciemny tekst, teł światła).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Użyj lightContent stanu (światło tekst, ciemne tło).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Użyj blackTranslucent stanu (światło tekst, ciemne tło).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Użyj blackOpaque stanu (światło tekst, ciemne tło).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tła stanu przez nazwę koloru.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Nazwy kolorów obsługiwane są:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Ustawia kolor tła stanu przez ciąg szesnastkowy.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Obsługiwane są również właściwości CSS.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tła stanu przez ciąg szesnastkowy (#RRGGBB).
|
||||
|
||||
Na WP7 i WP8 można również określić wartości jako #AARRGGBB, gdzie AA jest wartością alfa
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Ukryj pasek stanu.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Pokazuje pasek stanu.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Czytać tej właściwość, aby sprawdzić, czy stanu jest widoczne lub nie.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
262
doc/pl/index.md
262
doc/pl/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`Obiekt zawiera kilka funkcji, aby dostosować iOS i Android StatusBar.
|
||||
|
||||
## Instalacja
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## Preferencje
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (boolean, domyślnie na wartość true). Na iOS 7 zrobić nakładki stanu lub nie nakładki widoku sieci Web podczas uruchamiania.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (kolor szesnastkowy ciąg, domyślnie #000000). Na iOS 7 ustawić kolor tła stanu przez ciąg szesnastkowy (#RRGGBB) przy starcie systemu.
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (stan styl paska, domyślnie lightcontent.) Na iOS 7 ustawić styl paska stanu. Dostępne opcje domyślne, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## Przy starcie
|
||||
|
||||
Podczas uruchamiania można użyć funkcji StatusBar.hide poniżej, ale jeśli chcesz StatusBar ukryty w uruchamiania aplikacji, należy zmodyfikować plik Info.plist Twojej aplikacji.
|
||||
|
||||
Dodawanie/edycja tych dwóch atrybutów jeśli nie obecny. Ustawianie **"pasek stanu jest początkowo ukryte"** na **"Tak"** i **"Oparte na kontroler stanu paska wygląd"** na **"Nie"**. Jeśli możesz go edytować ręcznie bez Xcode, kluczy i wartości są:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Metody
|
||||
|
||||
Ten plugin definiuje obiekt globalny `StatusBar`.
|
||||
|
||||
Chociaż w globalnym zasięgu, to nie dostępne dopiero po `deviceready` imprezie.
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Właściwości
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Uprawnienia
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
Na iOS 7 zrobić statusbar nakładki lub nie nakładka widoku sieci Web.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Opis
|
||||
|
||||
Na iOS 7 zestaw do false, aby na pasku stanu pojawia się jak iOS 6. Ustaw kolor tła i styl do korzystania z innych funkcji.
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
|
||||
## Szybki przykład
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Użyj domyślnego stanu (ciemny tekst, teł światła).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Użyj lightContent stanu (światło tekst, ciemne tło).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Użyj blackTranslucent stanu (światło tekst, ciemne tło).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Użyj blackOpaque stanu (światło tekst, ciemne tło).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tła stanu przez nazwę koloru.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Nazwy kolorów obsługiwane są:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Ustawia kolor tła stanu przez ciąg szesnastkowy.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Obsługiwane są również właściwości CSS.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
Na iOS 7 gdy zostanie ustawiona wartość false, StatusBar.statusBarOverlaysWebView można ustawić kolor tła stanu przez ciąg szesnastkowy (#RRGGBB).
|
||||
|
||||
Na WP7 i WP8 można również określić wartości jako #AARRGGBB, gdzie AA jest wartością alfa
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Ukryj pasek stanu.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Pokazuje pasek stanu.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Czytać tej właściwość, aby sprawdzić, czy stanu jest widoczne lub nie.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Obsługiwane platformy
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
238
doc/ru/index.md
238
doc/ru/index.md
@@ -1,238 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> Объект `StatusBar` предоставляет некоторые функции для настройки статусной панели на iOS и Android.
|
||||
|
||||
## Настройки
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView** (логическое значение, по умолчанию true). В iOS 7 определяет необходимо ли сделать наложение статусной панели на WebView при запуске или нет.
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor** (шестнадцатеричная строка цвета, значения по умолчанию #000000). На iOS 7 установит цвет фона статусной панели при запуске, на основании шестнадцатеричной строки цвета (#RRGGBB).
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **StatusBarStyle** (статус бар стиль, по умолчанию lightcontent). На iOS 7 установите стиль строки состояния. Доступные параметры по умолчанию, lightcontent, blacktranslucent, blackopaque.
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## Скрытие при запуске
|
||||
|
||||
Во время выполнения можно использовать функцию StatusBar.hide ниже, но если вы хотите StatusBar быть скрыты при запуске приложения, необходимо изменить файл Info.plist вашего приложения.
|
||||
|
||||
Добавьте/измените эти два атрибута, если они не присутствуют или отличаются от нижеуказанных значений. Установите значение **«Status bar is initially hidden»** равное **«YES»** и установите значение **«View controller-based status bar appearance»** на **«NO»**. Если вы измените его вручную без Xcode, ключи и значения являются следующими:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## Методы
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## Параметры
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## Разрешения
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
На iOS 7 Сделайте statusbar overlay или не поверх WebView.
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## Описание
|
||||
|
||||
На iOS 7 Установите значение false чтобы сделать statusbar появляются как iOS 6. Задайте стиль и цвет фона в соответствии с использованием других функций.
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
|
||||
## Краткий пример
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
Используйте по умолчанию statusbar (темный текст, для легких стола).
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
Используйте lightContent statusbar (светлый текст, на темном фоне).
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
Используйте blackTranslucent statusbar (светлый текст, на темном фоне).
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
Используйте blackOpaque statusbar (светлый текст, на темном фоне).
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
На iOS 7 когда StatusBar.statusBarOverlaysWebView присвоено значение false, можно задать цвет фона для объекта statusbar по имени цвета.
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
Имена поддерживаемых цветов являются:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
Задает цвет фона для объекта statusbar, шестнадцатеричная строка.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
Также поддерживаются свойства CSS стенографию.
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
На iOS 7 когда StatusBar.statusBarOverlaysWebView присвоено значение false, можно задать цвет фона для объекта statusbar, шестнадцатеричная строка (#RRGGBB).
|
||||
|
||||
На WP7 и WP8 также можно указать значения как #AARRGGBB, где AA — это альфа-значение
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
Скройте строку состояния statusbar.
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
Показывает строку состояния statusbar.
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
Чтение это свойство, чтобы увидеть, если statusbar является видимым или нет.
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## Поддерживаемые платформы
|
||||
|
||||
* iOS
|
||||
* Android
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
276
doc/zh/README.md
276
doc/zh/README.md
@@ -1,276 +0,0 @@
|
||||
<!---
|
||||
# license: Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
[](https://travis-ci.org/apache/cordova-plugin-statusbar)
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`物件提供了一些功能,自訂的 iOS 和 Android 狀態列。
|
||||
|
||||
## 安裝
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## 首選項
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView**(布林值,預設值為 true)。在 iOS 7,使狀態列覆蓋或不覆蓋 web 視圖在啟動時。
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor**(顏色十六進位字串,預設值為 #000000)。IOS 7 和 Android 5,由十六進位字串 (#RRGGBB) 在啟動時設置狀態列的背景色。
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **狀態列**(狀態列樣式,預設值為 lightcontent)。在 iOS 7,設置的狀態橫條圖樣式。可用的選項預設,lightcontent,blacktranslucent,blackopaque。
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
### Android 的怪癖
|
||||
|
||||
Android 的 5 + 準則指定使用不同的顏色比您主要的應用程式狀態欄顏色 (不像很多 iOS 7 + 應用程式的統一狀態列顏色),所以你可能想要設置在運行時顯示狀態列顏色而不是通過`StatusBar.backgroundColorByHexString`或`StatusBar.backgroundColorByName`。 一個的方式做到這一點將是:
|
||||
|
||||
```js
|
||||
if (cordova.platformId == 'android') {
|
||||
StatusBar.backgroundColorByHexString("#333");
|
||||
}
|
||||
```
|
||||
|
||||
## 在啟動時隱藏
|
||||
|
||||
在運行時期間,你可以使用 StatusBar.hide 函數下面,但如果你想要顯示狀態列隱藏在應用程式啟動時,你必須修改你的應用程式的 Info.plist 檔。
|
||||
|
||||
添加編輯這兩個屬性,如果不存在。 將**"狀態列最初隱藏"**設置為**"YES"**和**"視圖基於控制器的狀態列外觀"**設置為**"否"**。 如果您手動編輯它沒有 Xcode,鍵和值是:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## 方法
|
||||
|
||||
這個外掛程式定義全域 `StatusBar` 物件。
|
||||
|
||||
雖然在全球範圍內,它不可用直到 `deviceready` 事件之後。
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## 屬性
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## 許可權
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
在 iOS 7,使狀態列覆蓋或不覆蓋 web 視圖。
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## 說明
|
||||
|
||||
在 iOS 7,設置為 false,使狀態列出現像 iOS 6。設置樣式和背景顏色,適合使用其他函數。
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
|
||||
## 快速的示例
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
使用預設狀態列 (淺色背景深色文本)。
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
使用 lightContent 狀態列 (深色背景光文本)。
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
使用 blackTranslucent 狀態列 (深色背景光文本)。
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
使用 blackOpaque 狀態列 (深色背景光文本)。
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
在 iOS 7,當您將 StatusBar.statusBarOverlaysWebView 設置為 false,你可以設置狀態列的背景色的顏色名稱。
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
支援的顏色名稱是:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
由十六進位字串設置狀態列的背景色。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
此外支援 CSS 速記屬性。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
在 iOS 7,當將 StatusBar.statusBarOverlaysWebView 設置為 false,您可以設置狀態列的背景色由十六進位字串 (#RRGGBB)。
|
||||
|
||||
WP7 和 WP8 您還可以指定值為 #AARRGGBB,其中 AA 是 Alpha 值
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Android 5+
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
隱藏狀態列。
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Android 系統
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
顯示狀態列。
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Android 系統
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
讀取此屬性,以查看狀態列是否可見。
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Android 系統
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
262
doc/zh/index.md
262
doc/zh/index.md
@@ -1,262 +0,0 @@
|
||||
<!---
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# cordova-plugin-statusbar
|
||||
|
||||
# StatusBar
|
||||
|
||||
> `StatusBar`物件提供了一些功能,自訂的 iOS 和 Android 狀態列。
|
||||
|
||||
## 安裝
|
||||
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
|
||||
|
||||
## 首選項
|
||||
|
||||
#### config.xml
|
||||
|
||||
* **StatusBarOverlaysWebView**(布林值,預設值為 true)。在 iOS 7,使狀態列覆蓋或不覆蓋 web 視圖在啟動時。
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
|
||||
|
||||
* **StatusBarBackgroundColor**(顏色十六進位字串,預設值為 #000000)。在 iOS 7,通過一個十六進位字串 (#RRGGBB) 在啟動時設置狀態列的背景色。
|
||||
|
||||
<preference name="StatusBarBackgroundColor" value="#000000" />
|
||||
|
||||
|
||||
* **狀態列**(狀態列樣式,預設值為 lightcontent)。在 iOS 7,設置的狀態橫條圖樣式。可用的選項預設,lightcontent,blacktranslucent,blackopaque。
|
||||
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
|
||||
## 在啟動時隱藏
|
||||
|
||||
在運行時期間,你可以使用 StatusBar.hide 函數下面,但如果你想要顯示狀態列隱藏在應用程式啟動時,你必須修改你的應用程式的 Info.plist 檔。
|
||||
|
||||
添加編輯這兩個屬性,如果不存在。 將**"狀態列最初隱藏"**設置為**"YES"**和**"視圖基於控制器的狀態列外觀"**設置為**"否"**。 如果您手動編輯它沒有 Xcode,鍵和值是:
|
||||
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
|
||||
|
||||
## 方法
|
||||
|
||||
這個外掛程式定義全域 `StatusBar` 物件。
|
||||
|
||||
雖然在全球範圍內,它不可用直到 `deviceready` 事件之後。
|
||||
|
||||
document.addEventListener("deviceready", onDeviceReady, false);
|
||||
function onDeviceReady() {
|
||||
console.log(StatusBar);
|
||||
}
|
||||
|
||||
|
||||
* StatusBar.overlaysWebView
|
||||
* StatusBar.styleDefault
|
||||
* StatusBar.styleLightContent
|
||||
* StatusBar.styleBlackTranslucent
|
||||
* StatusBar.styleBlackOpaque
|
||||
* StatusBar.backgroundColorByName
|
||||
* StatusBar.backgroundColorByHexString
|
||||
* StatusBar.hide
|
||||
* StatusBar.show
|
||||
|
||||
## 屬性
|
||||
|
||||
* StatusBar.isVisible
|
||||
|
||||
## 許可權
|
||||
|
||||
#### config.xml
|
||||
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" onload="true" />
|
||||
</feature>
|
||||
|
||||
|
||||
# StatusBar.overlaysWebView
|
||||
|
||||
在 iOS 7,使狀態列覆蓋或不覆蓋 web 視圖。
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
|
||||
|
||||
## 說明
|
||||
|
||||
在 iOS 7,設置為 false,使狀態列出現像 iOS 6。設置樣式和背景顏色,適合使用其他函數。
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
|
||||
## 快速的示例
|
||||
|
||||
StatusBar.overlaysWebView(true);
|
||||
StatusBar.overlaysWebView(false);
|
||||
|
||||
|
||||
# StatusBar.styleDefault
|
||||
|
||||
使用預設狀態列 (淺色背景深色文本)。
|
||||
|
||||
StatusBar.styleDefault();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleLightContent
|
||||
|
||||
使用 lightContent 狀態列 (深色背景光文本)。
|
||||
|
||||
StatusBar.styleLightContent();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackTranslucent
|
||||
|
||||
使用 blackTranslucent 狀態列 (深色背景光文本)。
|
||||
|
||||
StatusBar.styleBlackTranslucent();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.styleBlackOpaque
|
||||
|
||||
使用 blackOpaque 狀態列 (深色背景光文本)。
|
||||
|
||||
StatusBar.styleBlackOpaque();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByName
|
||||
|
||||
在 iOS 7,當您將 StatusBar.statusBarOverlaysWebView 設置為 false,你可以設置狀態列的背景色的顏色名稱。
|
||||
|
||||
StatusBar.backgroundColorByName("red");
|
||||
|
||||
|
||||
支援的顏色名稱是:
|
||||
|
||||
black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.backgroundColorByHexString
|
||||
|
||||
由十六進位字串設置狀態列的背景色。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#C0C0C0");
|
||||
|
||||
|
||||
此外支援 CSS 速記屬性。
|
||||
|
||||
StatusBar.backgroundColorByHexString("#333"); // => #333333
|
||||
StatusBar.backgroundColorByHexString("#FAB"); // => #FFAABB
|
||||
|
||||
|
||||
在 iOS 7,當將 StatusBar.statusBarOverlaysWebView 設置為 false,您可以設置狀態列的背景色由十六進位字串 (#RRGGBB)。
|
||||
|
||||
WP7 和 WP8 您還可以指定值為 #AARRGGBB,其中 AA 是 Alpha 值
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.hide
|
||||
|
||||
隱藏狀態列。
|
||||
|
||||
StatusBar.hide();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* 安卓系統
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.show
|
||||
|
||||
顯示狀態列。
|
||||
|
||||
StatusBar.show();
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* 安卓系統
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
|
||||
# StatusBar.isVisible
|
||||
|
||||
讀取此屬性,以查看狀態列是否可見。
|
||||
|
||||
if (StatusBar.isVisible) {
|
||||
// do something
|
||||
}
|
||||
|
||||
|
||||
## 支援的平臺
|
||||
|
||||
* iOS
|
||||
* 安卓系統
|
||||
* Windows Phone 7
|
||||
* Windows Phone 8
|
||||
* Windows Phone 8.1
|
||||
10
package.json
10
package.json
@@ -1,14 +1,13 @@
|
||||
{
|
||||
"name": "cordova-plugin-statusbar",
|
||||
"version": "2.2.0",
|
||||
"version": "2.4.4-dev",
|
||||
"description": "Cordova StatusBar Plugin",
|
||||
"types": "./types/index.d.ts",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-statusbar",
|
||||
"platforms": [
|
||||
"android",
|
||||
"ios",
|
||||
"wp7",
|
||||
"wp8",
|
||||
"windows"
|
||||
]
|
||||
},
|
||||
@@ -16,14 +15,15 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/apache/cordova-plugin-statusbar"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/apache/cordova-plugin-statusbar/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"cordova",
|
||||
"statusbar",
|
||||
"ecosystem:cordova",
|
||||
"cordova-android",
|
||||
"cordova-ios",
|
||||
"cordova-wp7",
|
||||
"cordova-wp8",
|
||||
"cordova-windows"
|
||||
],
|
||||
"scripts": {
|
||||
|
||||
27
plugin.xml
27
plugin.xml
@@ -19,10 +19,9 @@
|
||||
-->
|
||||
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:rim="http://www.blackberry.com/ns/widgets"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="cordova-plugin-statusbar"
|
||||
version="2.2.0">
|
||||
version="2.4.4-dev">
|
||||
<name>StatusBar</name>
|
||||
<description>Cordova StatusBar Plugin</description>
|
||||
<license>Apache 2.0</license>
|
||||
@@ -53,9 +52,7 @@
|
||||
</js-module>
|
||||
</platform>
|
||||
|
||||
<!-- ios -->
|
||||
<platform name="ios">
|
||||
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" value="CDVStatusBar" />
|
||||
@@ -67,30 +64,8 @@
|
||||
|
||||
<header-file src="src/ios/CDVStatusBar.h" />
|
||||
<source-file src="src/ios/CDVStatusBar.m" />
|
||||
|
||||
</platform>
|
||||
|
||||
<!-- wp7 -->
|
||||
<platform name="wp7">
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<feature name="StatusBar">
|
||||
<param name="wp-package" value="StatusBar"/>
|
||||
</feature>
|
||||
</config-file>
|
||||
<source-file src="src/wp/StatusBar.cs" />
|
||||
</platform>
|
||||
|
||||
<!-- wp8 -->
|
||||
<platform name="wp8">
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<feature name="StatusBar">
|
||||
<param name="wp-package" value="StatusBar"/>
|
||||
</feature>
|
||||
</config-file>
|
||||
<source-file src="src/wp/StatusBar.cs" />
|
||||
</platform>
|
||||
|
||||
<!-- windows -->
|
||||
<platform name="windows">
|
||||
<js-module src="src/windows/StatusBarProxy.js" name="StatusBarProxy">
|
||||
<runs />
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
package org.apache.cordova.statusbar;
|
||||
|
||||
import android.app.Activity;
|
||||
@@ -34,6 +34,7 @@ import org.apache.cordova.CordovaWebView;
|
||||
import org.apache.cordova.LOG;
|
||||
import org.apache.cordova.PluginResult;
|
||||
import org.json.JSONException;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class StatusBar extends CordovaPlugin {
|
||||
private static final String TAG = "StatusBar";
|
||||
@@ -56,10 +57,27 @@ public class StatusBar extends CordovaPlugin {
|
||||
// Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially
|
||||
// by the Cordova.
|
||||
Window window = cordova.getActivity().getWindow();
|
||||
// 添加的内容开始
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
// window.addFlags(WindowManager.LayoutParams
|
||||
// .FLAG_TRANSLUCENT_NAVIGATION);
|
||||
window.addFlags(WindowManager.LayoutParams
|
||||
.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.setStatusBarColor(Color.TRANSPARENT);
|
||||
window.setNavigationBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
|
||||
// window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
// | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN);
|
||||
// 添加的内容结束
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
|
||||
|
||||
// Read 'StatusBarBackgroundColor' from config.xml, default is #000000.
|
||||
setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000"));
|
||||
|
||||
// Read 'StatusBarStyle' from config.xml, default is 'lightcontent'.
|
||||
setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent"));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -142,6 +160,63 @@ 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;
|
||||
}
|
||||
|
||||
if ("styleDefault".equals(action)) {
|
||||
this.cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setStatusBarStyle("default");
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
if ("styleLightContent".equals(action)) {
|
||||
this.cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setStatusBarStyle("lightcontent");
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
if ("styleBlackTranslucent".equals(action)) {
|
||||
this.cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setStatusBarStyle("blacktranslucent");
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
if ("styleBlackOpaque".equals(action)) {
|
||||
this.cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setStatusBarStyle("blackopaque");
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -154,7 +229,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) {
|
||||
@@ -164,4 +239,54 @@ 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) {
|
||||
// cordova.getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
window.getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||
window.setStatusBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
else {
|
||||
// cordova.getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
window.getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setStatusBarStyle(final String style) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (style != null && !style.isEmpty()) {
|
||||
View decorView = cordova.getActivity().getWindow().getDecorView();
|
||||
int uiOptions = decorView.getSystemUiVisibility();
|
||||
|
||||
String[] darkContentStyles = {
|
||||
"default",
|
||||
};
|
||||
|
||||
String[] lightContentStyles = {
|
||||
"lightcontent",
|
||||
"blacktranslucent",
|
||||
"blackopaque",
|
||||
};
|
||||
|
||||
if (Arrays.asList(darkContentStyles).contains(style.toLowerCase())) {
|
||||
decorView.setSystemUiVisibility(uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Arrays.asList(lightContentStyles).contains(style.toLowerCase())) {
|
||||
decorView.setSystemUiVisibility(uiOptions & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG.e(TAG, "Invalid style, must be either 'default', 'lightcontent' or the deprecated 'blacktranslucent' and 'blackopaque'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,9 @@ function notSupported(win,fail) {
|
||||
//
|
||||
console.log('StatusBar is not supported');
|
||||
setTimeout(function(){
|
||||
win();
|
||||
if (win) {
|
||||
win();
|
||||
}
|
||||
// note that while it is not explicitly supported, it does not fail
|
||||
// this is really just here to allow developers to test their code in the browser
|
||||
// and if we fail, then their app might as well. -jm
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
}
|
||||
|
||||
@property (atomic, assign) BOOL statusBarOverlaysWebView;
|
||||
@property (atomic, assign) BOOL statusBarVisible;
|
||||
|
||||
- (void) overlaysWebView:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
|
||||
@@ -90,28 +90,38 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)statusBarDidChangeFrame:(NSNotification*)notification
|
||||
-(void)cordovaViewWillAppear:(NSNotification*)notification
|
||||
{
|
||||
//add a small delay for iOS 7 ( 0.1 seconds )
|
||||
//add a small delay ( 0.1 seconds ) or statusbar size will be wrong
|
||||
__weak CDVStatusBar* weakSelf = self;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
[weakSelf resizeWebView];
|
||||
});
|
||||
}
|
||||
|
||||
-(void)statusBarDidChangeFrame:(NSNotification*)notification
|
||||
{
|
||||
//add a small delay ( 0.1 seconds ) or statusbar size will be wrong
|
||||
__weak CDVStatusBar* weakSelf = self;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
[weakSelf resizeStatusBarBackgroundView];
|
||||
[weakSelf resizeWebView];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)pluginInitialize
|
||||
{
|
||||
BOOL isiOS7 = (IsAtLeastiOSVersion(@"7.0"));
|
||||
|
||||
// init
|
||||
NSNumber* uiviewControllerBasedStatusBarAppearance = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"];
|
||||
_uiviewControllerBasedStatusBarAppearance = (uiviewControllerBasedStatusBarAppearance == nil || [uiviewControllerBasedStatusBarAppearance boolValue]) && isiOS7;
|
||||
_uiviewControllerBasedStatusBarAppearance = (uiviewControllerBasedStatusBarAppearance == nil || [uiviewControllerBasedStatusBarAppearance boolValue]);
|
||||
|
||||
// observe the statusBarHidden property
|
||||
[[UIApplication sharedApplication] addObserver:self forKeyPath:@"statusBarHidden" options:NSKeyValueObservingOptionNew context:NULL];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(statusBarDidChangeFrame:) name: UIApplicationDidChangeStatusBarFrameNotification object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(cordovaViewWillAppear:) name: @"CDVViewWillAppearNotification" object:nil];
|
||||
|
||||
_statusBarOverlaysWebView = YES; // default
|
||||
|
||||
[self initializeStatusBarBackgroundView];
|
||||
@@ -130,8 +140,14 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
[self setStatusBarStyle:[self settingForKey:setting]];
|
||||
}
|
||||
|
||||
setting = @"StatusBarDefaultScrollToTop";
|
||||
if ([self settingForKey:setting]) {
|
||||
self.webView.scrollView.scrollsToTop = [(NSNumber*)[self settingForKey:setting] boolValue];
|
||||
} else {
|
||||
self.webView.scrollView.scrollsToTop = NO;
|
||||
}
|
||||
|
||||
// blank scroll view to intercept status bar taps
|
||||
self.webView.scrollView.scrollsToTop = NO;
|
||||
UIScrollView *fakeScrollView = [[UIScrollView alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
||||
fakeScrollView.delegate = self;
|
||||
fakeScrollView.scrollsToTop = YES;
|
||||
@@ -139,6 +155,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 {
|
||||
@@ -182,7 +200,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
|
||||
if ([[UIApplication sharedApplication]statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown &&
|
||||
statusBarFrame.size.height + statusBarFrame.origin.y == [[UIScreen mainScreen] bounds].size.height) {
|
||||
statusBarFrame.size.height + statusBarFrame.origin.y == [self.viewController.view.window bounds].size.height) {
|
||||
|
||||
// When started in upside-down orientation on iOS 7, status bar will be bound to lower edge of the
|
||||
// screen (statusBarFrame.origin.y will be somewhere around screen height). In this case we need to
|
||||
@@ -190,34 +208,19 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
statusBarFrame.origin.y = 0;
|
||||
}
|
||||
|
||||
statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
|
||||
|
||||
_statusBarBackgroundView = [[UIView alloc] initWithFrame:statusBarFrame];
|
||||
_statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor;
|
||||
_statusBarBackgroundView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin);
|
||||
_statusBarBackgroundView.autoresizesSubviews = YES;
|
||||
}
|
||||
|
||||
- (CGRect) invertFrameIfNeeded:(CGRect)rect {
|
||||
// landscape is where (width > height). On iOS < 8, we need to invert since frames are
|
||||
// always in Portrait context
|
||||
if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]) && (rect.size.width < rect.size.height)) {
|
||||
CGFloat temp = rect.size.width;
|
||||
rect.size.width = rect.size.height;
|
||||
rect.size.height = temp;
|
||||
rect.origin = CGPointZero;
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (void) setStatusBarOverlaysWebView:(BOOL)statusBarOverlaysWebView
|
||||
{
|
||||
// we only care about the latest iOS version or a change in setting
|
||||
if (!IsAtLeastiOSVersion(@"7.0") || statusBarOverlaysWebView == _statusBarOverlaysWebView) {
|
||||
if (statusBarOverlaysWebView == _statusBarOverlaysWebView) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
_statusBarOverlaysWebView = statusBarOverlaysWebView;
|
||||
|
||||
[self resizeWebView];
|
||||
@@ -301,22 +304,12 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
- (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000
|
||||
# define TRANSLUCENT_STYLE UIStatusBarStyleBlackTranslucent
|
||||
#else
|
||||
# define TRANSLUCENT_STYLE UIStatusBarStyleLightContent
|
||||
#endif
|
||||
[self setStyleForStatusBar:TRANSLUCENT_STYLE];
|
||||
[self setStyleForStatusBar:UIStatusBarStyleLightContent];
|
||||
}
|
||||
|
||||
- (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000
|
||||
# define OPAQUE_STYLE UIStatusBarStyleBlackOpaque
|
||||
#else
|
||||
# define OPAQUE_STYLE UIStatusBarStyleLightContent
|
||||
#endif
|
||||
[self setStyleForStatusBar:OPAQUE_STYLE];
|
||||
[self setStyleForStatusBar:UIStatusBarStyleLightContent];
|
||||
}
|
||||
|
||||
- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command
|
||||
@@ -372,16 +365,15 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
- (void) hide:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
_statusBarVisible = NO;
|
||||
UIApplication* app = [UIApplication sharedApplication];
|
||||
|
||||
if (!app.isStatusBarHidden)
|
||||
{
|
||||
|
||||
|
||||
[self hideStatusBar];
|
||||
|
||||
if (IsAtLeastiOSVersion(@"7.0")) {
|
||||
[_statusBarBackgroundView removeFromSuperview];
|
||||
}
|
||||
[_statusBarBackgroundView removeFromSuperview];
|
||||
|
||||
[self resizeWebView];
|
||||
|
||||
@@ -404,30 +396,21 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
- (void) show:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
_statusBarVisible = YES;
|
||||
UIApplication* app = [UIApplication sharedApplication];
|
||||
|
||||
if (app.isStatusBarHidden)
|
||||
{
|
||||
BOOL isIOS7 = (IsAtLeastiOSVersion(@"7.0"));
|
||||
|
||||
[self showStatusBar];
|
||||
[self resizeWebView];
|
||||
|
||||
if (isIOS7) {
|
||||
if (!self.statusBarOverlaysWebView) {
|
||||
|
||||
if (!self.statusBarOverlaysWebView) {
|
||||
|
||||
// there is a possibility that when the statusbar was hidden, it was in a different orientation
|
||||
// from the current one. Therefore we need to expand the statusBarBackgroundView as well to the
|
||||
// statusBar's current size
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
|
||||
CGRect sbBgFrame = _statusBarBackgroundView.frame;
|
||||
sbBgFrame.size = statusBarFrame.size;
|
||||
_statusBarBackgroundView.frame = sbBgFrame;
|
||||
[self.webView.superview addSubview:_statusBarBackgroundView];
|
||||
|
||||
}
|
||||
// there is a possibility that when the statusbar was hidden, it was in a different orientation
|
||||
// from the current one. Therefore we need to expand the statusBarBackgroundView as well to the
|
||||
// statusBar's current size
|
||||
[self resizeStatusBarBackgroundView];
|
||||
[self.webView.superview addSubview:_statusBarBackgroundView];
|
||||
|
||||
}
|
||||
|
||||
@@ -435,52 +418,51 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)resizeStatusBarBackgroundView {
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
CGRect sbBgFrame = _statusBarBackgroundView.frame;
|
||||
sbBgFrame.size = statusBarFrame.size;
|
||||
_statusBarBackgroundView.frame = sbBgFrame;
|
||||
}
|
||||
|
||||
-(void)resizeWebView
|
||||
{
|
||||
BOOL isIOS7 = (IsAtLeastiOSVersion(@"7.0"));
|
||||
BOOL isIOS11 = (IsAtLeastiOSVersion(@"11.0"));
|
||||
|
||||
if (isIOS7) {
|
||||
CGRect bounds = [[UIScreen mainScreen] bounds];
|
||||
bounds = [self invertFrameIfNeeded:bounds];
|
||||
CGRect bounds = [self.viewController.view.window bounds];
|
||||
if (CGRectEqualToRect(bounds, CGRectZero)) {
|
||||
bounds = [[UIScreen mainScreen] 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);
|
||||
self.viewController.view.frame = bounds;
|
||||
|
||||
self.webView.frame = bounds;
|
||||
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
CGRect frame = self.webView.frame;
|
||||
CGFloat height = statusBarFrame.size.height;
|
||||
|
||||
if (!self.statusBarOverlaysWebView) {
|
||||
frame.origin.y = height;
|
||||
} else {
|
||||
frame.origin.y = height >= 20 ? height - 20 : 0;
|
||||
if (isIOS11) {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
|
||||
if (@available(iOS 11.0, *)) {
|
||||
float safeAreaTop = self.webView.safeAreaInsets.top;
|
||||
if (height >= safeAreaTop && safeAreaTop >0) {
|
||||
// Sometimes when in-call/recording/hotspot larger status bar is present, the safeAreaTop is 40 but we want frame.origin.y to be 20
|
||||
frame.origin.y = safeAreaTop == 40 ? 20 : height - safeAreaTop;
|
||||
} else {
|
||||
bounds = CGRectMake(0, 0, bounds.size.height, bounds.size.width);
|
||||
frame.origin.y = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
self.webView.frame = bounds;
|
||||
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
|
||||
CGRect frame = self.webView.frame;
|
||||
|
||||
if (!self.statusBarOverlaysWebView) {
|
||||
frame.origin.y = statusBarFrame.size.height;
|
||||
frame.size.height -= statusBarFrame.size.height;
|
||||
} else {
|
||||
// even if overlay is used, we want to handle in-call/recording/hotspot larger status bar
|
||||
CGFloat height = statusBarFrame.size.height;
|
||||
frame.origin.y = height >= 20 ? height - 20 : 0;
|
||||
frame.size.height -= frame.origin.y;
|
||||
}
|
||||
self.webView.frame = frame;
|
||||
} else {
|
||||
CGRect bounds = [[UIScreen mainScreen] applicationFrame];
|
||||
self.viewController.view.frame = bounds;
|
||||
}
|
||||
frame.size.height -= frame.origin.y;
|
||||
self.webView.frame = frame;
|
||||
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
using Microsoft.Phone.Shell;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Threading;
|
||||
|
||||
|
||||
/*
|
||||
* http://www.idev101.com/code/User_Interface/StatusBar.html
|
||||
* https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/Bars.html
|
||||
* https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/c/econst/UIStatusBarStyleDefault
|
||||
* */
|
||||
|
||||
|
||||
namespace WPCordovaClassLib.Cordova.Commands
|
||||
{
|
||||
public class StatusBar : BaseCommand
|
||||
{
|
||||
|
||||
// returns an argb value, if the hex is only rgb, it will be full opacity
|
||||
protected Color ColorFromHex(string hexString)
|
||||
{
|
||||
string cleanHex = hexString.Replace("#", "").Replace("0x", "");
|
||||
// turn #FFF into #FFFFFF
|
||||
if (cleanHex.Length == 3)
|
||||
{
|
||||
cleanHex = "" + cleanHex[0] + cleanHex[0] + cleanHex[1] + cleanHex[1] + cleanHex[2] + cleanHex[2];
|
||||
}
|
||||
// add an alpha 100% if it is missing
|
||||
if (cleanHex.Length == 6)
|
||||
{
|
||||
cleanHex = "FF" + cleanHex;
|
||||
}
|
||||
int argb = Int32.Parse(cleanHex, NumberStyles.HexNumber);
|
||||
Color clr = Color.FromArgb((byte)((argb & 0xff000000) >> 0x18),
|
||||
(byte)((argb & 0xff0000) >> 0x10),
|
||||
(byte)((argb & 0xff00) >> 8),
|
||||
(byte)(argb & 0xff));
|
||||
return clr;
|
||||
}
|
||||
|
||||
public void _ready(string options)
|
||||
{
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
bool isVis = SystemTray.IsVisible;
|
||||
// TODO: pass this to JS
|
||||
//Debug.WriteLine("Result::" + res);
|
||||
DispatchCommandResult(new PluginResult(PluginResult.Status.OK, isVis));
|
||||
});
|
||||
}
|
||||
|
||||
public void overlaysWebView(string options)
|
||||
{ //exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]);
|
||||
// string arg = JSON.JsonHelper.Deserialize<string[]>(options)[0];
|
||||
}
|
||||
|
||||
public void styleDefault(string options)
|
||||
{ //exec(null, null, "StatusBar", "styleDefault", []);
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
SystemTray.ForegroundColor = Colors.Black;
|
||||
});
|
||||
}
|
||||
|
||||
public void styleLightContent(string options)
|
||||
{ //exec(null, null, "StatusBar", "styleLightContent", []);
|
||||
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
SystemTray.ForegroundColor = Colors.White;
|
||||
});
|
||||
}
|
||||
|
||||
public void styleBlackTranslucent(string options)
|
||||
{ //exec(null, null, "StatusBar", "styleBlackTranslucent", []);
|
||||
styleLightContent(options);
|
||||
}
|
||||
|
||||
public void styleBlackOpaque(string options)
|
||||
{ //exec(null, null, "StatusBar", "styleBlackOpaque", []);
|
||||
styleLightContent(options);
|
||||
}
|
||||
|
||||
public void backgroundColorByName(string options)
|
||||
{ //exec(null, null, "StatusBar", "backgroundColorByName", [colorname]);
|
||||
// this should NOT be called, js should now be using/converting color names to hex
|
||||
}
|
||||
|
||||
public void backgroundColorByHexString(string options)
|
||||
{ //exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]);
|
||||
string argb = JSON.JsonHelper.Deserialize<string[]>(options)[0];
|
||||
|
||||
Color clr = ColorFromHex(argb);
|
||||
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
SystemTray.Opacity = clr.A / 255.0d;
|
||||
SystemTray.BackgroundColor = clr;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void hide(string options)
|
||||
{ //exec(null, null, "StatusBar", "hide", []);
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
SystemTray.IsVisible = false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void show(string options)
|
||||
{ //exec(null, null, "StatusBar", "show", []);
|
||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
SystemTray.IsVisible = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
14
tests/package.json
Normal file
14
tests/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "cordova-plugin-statusbar-tests",
|
||||
"version": "2.4.4-dev",
|
||||
"description": "",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-statusbar-tests",
|
||||
"platforms": []
|
||||
},
|
||||
"keywords": [
|
||||
"ecosystem:cordova"
|
||||
],
|
||||
"author": "",
|
||||
"license": "Apache 2.0"
|
||||
}
|
||||
@@ -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.0">
|
||||
version="2.4.4-dev">
|
||||
<name>Cordova StatusBar Plugin Tests</name>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
|
||||
81
types/index.d.ts
vendored
Normal file
81
types/index.d.ts
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
// Type definitions for cordova-plugin-statusbar
|
||||
// Project: https://github.com/apache/cordova-plugin-statusbar
|
||||
// Definitions by: Xinkai Chen <https://github.com/Xinkai>
|
||||
// Tim Brust <https://github.com/timbru31>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Global object StatusBar.
|
||||
*/
|
||||
interface Window {
|
||||
StatusBar: StatusBar;
|
||||
addEventListener(type: "statusTap", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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