Compare commits

..

101 Commits

Author SHA1 Message Date
zher52
c3ec85e858 调整虚拟按键颜色为黑色 2020-05-07 20:28:14 +08:00
zher52
7edd841078 处理虚拟按键背景问题 2020-04-30 20:25:38 +08:00
zher52
94631e171a 修改参数名称 2020-04-02 09:52:56 +08:00
zher52
db3adec857 添加全屏参数 更新readme 2020-04-02 09:28:04 +08:00
zher52
d3ea3d1771 处理app打开时黑屏的问题 2020-04-01 16:56:56 +08:00
zher52
0ffc88915b 设置为全屏展示 2019-11-14 15:18:03 +08:00
Jan Piotrowski
be85a1b14e
ci(travis): Upgrade node from 6 to 8 2019-07-02 20:59:02 +02:00
Jan Piotrowski
7936e7ea54
ci(travis): Remove Android 4.4, Add Android 9.0 2019-06-18 15:44:40 +02:00
Jan Piotrowski
0934d126d2
Travis CI: Add ADDITIONAL_TESTS_DIR=./tests/ios (#212)
* ADDITIONAL_TESTS_DIR=./tests/ios

* add actual code to run it
2019-05-11 00:33:14 +02:00
Jan Piotrowski
e44f9d1f1f Incremented plugin version. (splash20190509) 2019-05-09 22:43:34 +02:00
Jan Piotrowski
5339fcf377 Updated version and RELEASENOTES.md for release 5.0.3 (splash20190509) 2019-05-09 22:41:12 +02:00
Jan Piotrowski
49769ba2d4
Remove unsupported iOS10 Saucelabs simulator 2019-05-09 20:18:07 +02:00
Jan Piotrowski
6800de23b1
CI: Use universal paramedic travis.yml (#210) 2019-05-08 17:48:57 +02:00
エリス
76bec98b94
Revert Paramedic Dev Branch Usage (#208) 2019-05-07 16:45:26 +09:00
Jan Piotrowski
61e353f549
Improve README (#198)
* fix indentation

* add TOC

* fix more indentation and remove JIRA link

* apply changes from https://github.com/apache/cordova-plugin-splashscreen/pull/98

via @RobPosener

* add headline, resort

* remove outdated README translations

* remove outdated test README translations as well

* rework introduction

* optimize caPiTaLiZatiOn

* fix

* remove diff to native splash
2019-05-06 18:27:08 +02:00
エリス
4d8cd6f2fe Updated Travis CI Settings and Package.json (#194)
* Update NPM Package Node Requirement and Others

* Update Travis CI Config

* Stopped Local Tests from Running Sauce Tests with Wildcard Flag
2019-05-04 00:46:47 +02:00
Jan Piotrowski
8490496c0b Add or update GitHub pull request and issue template 2019-02-11 18:40:29 +01:00
Jan Piotrowski
95f91bf50c
remove JIRA link 2018-10-04 01:17:00 +02:00
Jan Piotrowski
e78f1d10b1
also accept terms for android sdk android-27 2018-10-01 12:36:38 +02:00
jcesarmobile
8ba8f41637
Merge pull request #138 from adamschachne/master
Fixed docs typo
2018-07-31 00:47:48 +02:00
jcesarmobile
91a8210890
Merge pull request #149 from mmig/CB-12277
CB-12277: (android) avoid NullPointerException  when removing splash-screen
2018-07-31 00:22:48 +02:00
russa
c95a26ab34 Merge branch 'master' into CB-12277 2018-05-22 12:43:52 +02:00
Suraj Pindoria
d96c08e00b CB-13826 Incremented plugin version. 2018-01-25 11:47:20 -08:00
Suraj Pindoria
09e1f06fb0 CB-13826 Updated version and RELEASENOTES.md for release 5.0.2 2018-01-25 11:41:07 -08:00
russa
f9c88b8ab8 CB-12277: (android) avoid NullPointerException on splashImageView when removing splashscreen 2018-01-25 18:18:40 +01:00
jcesarmobile
9a6ff27008
Merge pull request #147 from jcesarmobile/CB-13750
CB-13750: Add build-tools-26.0.2 to travis
2018-01-09 23:33:21 +01:00
Julio César
cadc68f75b CB-13750: Add build-tools-26.0.2 to travis 2018-01-09 20:23:26 +01:00
jcesarmobile
be8be330ac
Merge pull request #146 from jcesarmobile/CB-13737
CB-13737 (iOS): fix Splash screen images for iPhone X
2018-01-09 20:00:00 +01:00
Julio César
4ffaaa2952 CB-13737 (iOS): fix Splash screen images for iPhone X 2018-01-07 17:30:23 +01:00
jcesarmobile
b5e0c786c5 Fix release notes (#145) 2017-12-30 00:54:06 -05:00
Simon MacDonald
5197c664c3 Set VERSION to 5.0.2-dev (via coho) 2017-12-27 19:13:50 -05:00
Simon MacDonald
fb606fec6a CB-13714 Updated version and RELEASENOTES.md for release 5.0.1 (via coho) 2017-12-27 19:13:36 -05:00
jcesarmobile
57b553a68e CB-13709: Fix to allow 5.0.0 version install (#144) 2017-12-27 10:50:30 -05:00
Steve Gill
031afc5056 Set VERSION to 5.0.1-dev (via coho) 2017-12-15 17:26:45 -08:00
Steve Gill
36bf91c9e8 CB-13681 Updated version and RELEASENOTES.md for release 5.0.0 (via coho) 2017-12-15 17:25:13 -08:00
Vishal Mishra
a606af98ca
Merge pull request #143 from maverickmishra/master
CB-13677: Remove deprecated platforms
2017-12-13 23:20:58 -08:00
maverickmishra
2ae821c4a8 CB-13677: Remove deprecated platforms 2017-12-13 11:39:44 -08:00
Steve Gill
36c43827bb Set VERSION to 4.1.1-dev (via coho) 2017-11-06 14:38:40 -08:00
Steve Gill
326f13220e CB-13542 Updated version and RELEASENOTES.md for release 4.1.0 (via coho) 2017-11-06 14:37:46 -08:00
Adam Schachne
5f41762722 Fixed docs typo 2017-10-22 15:57:59 -07:00
Alexander Sorokin
5ca43e8c5d CB-13473: (CI) Removed browser builds from AppVeyor 2017-10-20 10:23:27 +03:00
Alexander Sorokin
278c5d8168 CB-13472: (CI) Fixed Travis Android builds again 2017-10-20 08:59:26 +03:00
MartijnW49
7cb318727b Update readme
This closes #116
2017-10-18 14:21:52 -07:00
MartijnW49
c2c3a980e1 Tabs to spaces 2017-10-18 14:21:51 -07:00
MartijnW49
1a4b51fbc8 CB-12011: (android) added the possibility to change the spinner color on Android 5.0+ apps 2017-10-18 14:21:51 -07:00
Joe Bowser
0b75c1faa0 This closes #85 2017-10-10 14:15:58 -07:00
Joe Bowser
09e95a2628 This closes #81 2017-10-10 14:14:13 -07:00
Joe Bowser
3180758a4e This closes #132 2017-10-10 14:08:31 -07:00
Andrea Lazzarotto
50a55883d3 CB-12626: Updated Android plugin
This closes #125

Prefer a slightly slower, but bulletproof, way to check for the splashscreen instead of relying on the Cordova preferences. This fixes the splash screen on several phones.
2017-10-05 14:05:50 -07:00
Andrea Lazzarotto
833dc7f783 Samsung crash quick-n-dirty fix 2017-10-05 13:57:45 -07:00
Alexander Sorokin
e443871785 CB-13299 (CI) Fix Android builds 2017-09-19 09:07:06 +03:00
Alexander Sorokin
fcef678a7f CB-13028 (CI) Browser builds on Travis and AppVeyor 2017-07-28 14:22:12 +03:00
Andrey Sharapov
e5c6772f17 CB-13094: (android) Don't show splash when activity being finished 2017-07-24 16:36:34 +04:00
filmaj
7c0ab0fa51 Closes #109 2017-07-18 21:26:05 -07:00
Alexander Sorokin
7735ae0598 CB-11487 (browser) Documented AutoHideSplashScreen for browser
this closes #107
2017-07-11 11:56:02 +03:00
Peter (Somogyvari) Metz
b0e1157c8a CB-11488 (browser) Guarding code against the case when deviceready fires earlier than the plugin init on cold-start 2017-07-11 10:55:19 +03:00
Peter (Somogyvari) Metz
a18cc8241a CB-11488 (browser) The hide() call became non re-entrant after the addition of fade out. This fixes the issue. 2017-07-11 10:55:18 +03:00
Peter (Somogyvari) Metz
bf9607e27f CB-11488 (browser) Added a 1 second long fade out to the splash screen instead of the hard remove from the DOM whenever hide() is called.
Also made a high z-index the default. This could be added from the user's stylesheets but if that only
gets parsed later, there may be flickering between the application UI and the splash screen itself.
2017-07-11 10:55:18 +03:00
Peter (Somogyvari) Metz
87d29ad6d3 CB-11487 (browser) The "standard" AutoHideSplashScreen config.xml property is now supported by the browser platform. 2017-07-11 10:55:18 +03:00
Peter (Somogyvari) Metz
2db7bac571 CB-11486 (browser) splashScreenDelay now feed through parseInt to ensure it's an integer by the time it's value is passed in to setTimeout() in hide(). 2017-07-11 10:55:17 +03:00
Alexander Sorokin
d6db9f3459 CB-13000: (CI) Speed up android builds 2017-07-10 10:34:56 +03:00
Alexander Sorokin
be635a36c1 CB-12991: (CI) Updated CI badges 2017-07-07 11:36:52 +03:00
Alexander Sorokin
d63786d33b CB-12935: (windows) Enable paramedic builds on AppVeyor 2017-06-30 09:32:26 +03:00
Alexander Sorokin
98f83fea5a CB-12935: (ios, android) Enable paramedic builds on Travis CI 2017-06-27 08:40:39 +03:00
jab
c81df6f274 CB-12947: (docs) Fix iPhone 5 and 5s resolution
(and add iPhone SE which was missing)
2017-06-23 11:39:29 -04:00
filmaj
ffda2e81b9 CB-12847: added bugs entry to package.json. 2017-05-25 19:03:13 +02:00
filmaj
e0cf396835 Close #126 2017-05-23 21:10:42 +02:00
filmaj
7f140e0176 Set VERSION to 4.0.4-dev (via coho) 2017-04-27 13:05:10 -07:00
filmaj
85aa605a12 CB-12736 Updated version and RELEASENOTES.md for release 4.0.3 (via coho) 2017-04-27 13:05:08 -07:00
Alexander Sorokin
7c687957f8 CB-12622 Added Android 6.0 build badge to README 2017-04-26 16:30:20 +03:00
Steve Gill
13849c3d20 CB-12685: added package.json to tests folder 2017-04-21 19:26:24 -07:00
Steve Gill
90ba3dfc5b Set VERSION to 4.0.3-dev (via coho) 2017-03-02 15:26:49 -08:00
Steve Gill
b1ceb532f8 CB-12519 Updated version and RELEASENOTES.md for release 4.0.2 2017-02-28 17:41:27 -08:00
daserge
1185561549 CB-12353 Corrected merges usage in plugin.xml 2017-01-20 14:57:35 +03:00
Nikita Matrosov
894d164191 CB-12369: Add plugin typings from DefinitelyTyped
This closes #123
2017-01-20 11:56:43 +03:00
Alexander Sorokin
caa5534c0d CB-12363 Added build badges for iOS 9.3 and 10.0 2017-01-18 13:38:07 +03:00
Shazron Abdullah
a922ce0453 CB-12236 - Fixed RELEASENOTES for cordova-plugin-splashscreen 2016-12-11 12:58:03 -08:00
Alexander Sorokin
6195d6741b CB-12230 Removed Windows 8.1 build badges 2016-12-09 13:58:36 +03:00
Shazron Abdullah
0f2a069588 CB-12224 Incremented plugin version. 2016-12-07 16:55:08 -08:00
Shazron Abdullah
782939f7ef CB-12224 Updated version and RELEASENOTES.md for release 4.0.1 2016-12-07 16:39:46 -08:00
daserge
04667e04c0 CB-11751 'extendedSplashScreen' is undefined
Document that splashscreen needs to be disabled on Windows in case of updating entire document body
2016-12-02 17:27:37 +03:00
daserge
de28cf89bf CB-9287 Not enough Icons and Splashscreens for Windows 8.1 and Windows Phone 8.1
Documented MRT-style configuration
2016-11-25 13:40:06 +03:00
Shazron Abdullah
770c264d2c CB-11917 - Remove pull request template checklist item: "iCLA has been submitted…"
This closes #115
2016-10-04 21:36:47 -07:00
Kerri Shotts
5a1ade6114 CB-11830 (iOS) Fix doc typos in PR#114 2016-09-29 12:06:07 -05:00
Kerri Shotts
62509f6b47 CB-11829 (iOS) Support for CB-9762; docs (CB-11830)
This closes #114
2016-09-28 11:52:02 -05:00
Steve Gill
2eb78b3724 CB-11832 Incremented plugin version. 2016-09-09 16:08:04 -07:00
Steve Gill
6e43615e25 CB-11832 Updated version and RELEASENOTES.md for release 4.0.0 2016-09-08 23:38:55 -07:00
Vladimir Kotikov
ac39b04b6f CB-11795 Add 'protective' entry to cordovaDependencies
The entry is required to protect end-users from fetching edge versions of the plugin by incompatible version of cordova. This also assumes that we will not introduce any regressions in compatibility w/ cordova in minor and patch releases. On every major release we will need to add similar entry with _next_ major version.

 This closes #113
2016-09-08 12:01:36 +03:00
Julio César
66f7ee34d1 Closing outdated pull request: close #106 2016-08-26 20:48:18 +02:00
Vladimir Kotikov
41ca5809b1 CB-11326 Prevent crash when initializing plugin after navigating to another URL 2016-07-21 23:08:02 +03:00
Franco Bugnano
0a8b5be3d1 Fix crash on iOS when reloading page from remote Safari
This closes #110
2016-07-21 21:39:41 +02:00
Vladimir Kotikov
d65c0c7cc5 Add badges for paramedic builds on Jenkins 2016-06-10 12:12:56 +03:00
Nikhil Khandelwal
4102589bd5 Add pull request template. 2016-05-23 13:54:00 -07:00
daserge
1eac08c558 CB-11179 Extend the windows-splashscreen docs
Documented a way to disable splashscreen
2016-05-12 17:57:30 +03:00
daserge
80b01049c8 CB-11159 Fix flaky splashscreen native tests
Adds a retry as a temporary measure
2016-05-12 15:00:00 +03:00
daserge
4adff6f1c9 CB-11156 Change default FadeSplashScreenDuration value 2016-05-12 15:00:00 +03:00
daserge
3d924fce1b CB-8056 Updated the dependency version, added it to the docs 2016-04-29 16:26:20 +03:00
Dmitry Blotsky
6a737203da CB-10996 Adding front matter to README.md 2016-04-22 19:35:51 -07:00
daserge
acb45f3a38 CB-8056 Implement splashscreen for Windows platform
The plugin implementation has been moved to the platform code
Documented SplashScreenBackgroundColor preference for Windows
Updated the docs
Updated plugin dependencies - cordova-windows@5 is required
Updated the plugin version to 4.0.0
2016-04-22 18:20:28 +03:00
daserge
8d66b9e353 CB-6498 Misleading documentation in Android Quirks 2016-04-19 15:03:04 +03:00
Steve Gill
edb6c3d6f8 CB-11091 Incremented plugin version. 2016-04-15 13:45:27 -07:00
49 changed files with 658 additions and 2520 deletions

28
.appveyor.yml Normal file
View File

@ -0,0 +1,28 @@
# 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:
nodejs_version: "4"
matrix:
- PLATFORM: windows-10-store
JUST_BUILD: --justBuild
install:
- npm cache clean -f
- 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%

42
.github/ISSUE_TEMPLATE.md vendored Normal file
View 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
View 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

View 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?
-->

View 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)

35
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,35 @@
<!--
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
Thanks!
-->
### Platforms affected
### 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. -->
### Description
<!-- Describe your changes in detail -->
### Testing
<!-- Please describe in detail how you tested your changes. -->
### Checklist
- [ ] 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

View File

@ -1,8 +1,123 @@
language: objective-c # 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 sudo: false
node_js:
- "4.2" addons:
jwt:
# sauce labs key
secure: UmbBQ73ydIzhTCfaTb/g0beTwnOHjYxlILmQYK2Tl9Gna/KbpawiVmbloX1eZakevkeYgzQmAHEF0LyDINy5AUk97azYeP0Sz/IOjIDfXAdc6U6sZb7BScneBMt6ET/hCprG4f3mbmleQ+gx+dmNWez6rlb3Xu+XWfJuwDfAWm0=
env: env:
- TEST_DIR=. global:
- TEST_DIR=./tests/ios - SAUCE_USERNAME=snay
script: cd $TEST_DIR && npm install && npm test - 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:
# additional `npm test` in directory
- env: ADDITIONAL_TESTS_DIR=./tests/ios
<<: *_ios
# one local test, 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

223
README.md
View File

@ -1,3 +1,7 @@
---
title: 可设置全屏显示的 Splashscreen
description: Control the splash screen for your app.
---
<!-- <!--
# license: Licensed to the Apache Software Foundation (ASF) under one # license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file # or more contributor license agreements. See the NOTICE file
@ -17,218 +21,33 @@
# under the License. # under the License.
--> -->
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
# cordova-plugin-splashscreen # cordova-plugin-splashscreen
This plugin is required to work with splash screens. This plugin displays and hides a splash screen during application launch. 在 [cordova-plugin-splashscreen](https://github.com/apache/cordova-plugin-splashscreen.git) 的基础上添加了全屏设置,处理了android启动app时黑屏的问题
Report issues with this plugin on the [Apache Cordova issue tracker][Apache Cordova issue tracker]. - [Installation](#installation)
- [Preferences](#preferences)
* [config.xml](#configxml)
- [Other](#other)
## Installation ## Installation
// npm hosted (new) id // 安装前请先卸载 cordova-plugin-splashscreen 插件
cordova plugin add cordova-plugin-splashscreen cordova plugin rm cordova-plugin-splashscreen
// you may also install directly from this repo // 安装插件
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git cordova plugin add https://github.com/shuto-cn/cordova-plugin-splashscreen.git
## Supported Platforms
- Amazon Fire OS
- Android
- BlackBerry 10
- iOS
- Windows Phone 7 and 8
- Windows 8
- Windows
- Browser
## Example Configuration
In the top-level `config.xml` file (not the one in `platforms`), add configuration elements like those specified here.
Please notice that the value of the "src" attribute is relative to the project directory and not to the www directory. You can name the source image whatever you like. The internal name in the app is determined by Cordova.
```xml
<platform name="android">
<!-- you can use any density that exists in the Android project -->
<splash src="res/screen/android/splash-land-hdpi.png" density="land-hdpi"/>
<splash src="res/screen/android/splash-land-ldpi.png" density="land-ldpi"/>
<splash src="res/screen/android/splash-land-mdpi.png" density="land-mdpi"/>
<splash src="res/screen/android/splash-land-xhdpi.png" density="land-xhdpi"/>
<splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
<splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
<splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
<splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
</platform>
<platform name="ios">
<!-- images are determined by width and height. The following are supported -->
<splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
<splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
<splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
<splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
<splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
<splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/>
</platform>
<platform name="windows">
<!-- images are determined by width and height. The following are supported -->
<splash src="res/screen/windows/splashscreen.png" width="620" height="300"/>
<splash src="res/screen/windows/splashscreenphone.png" width="1152" height="1920"/>
</platform>
<platform name="blackberry10">
<!-- Add a rim:splash element for each resolution and locale you wish -->
<!-- http://developer.blackberry.com/html5/documentation/rim_splash_element.html -->
<rim:splash src="res/screen/blackberry/splashscreen.png"/>
</platform>
<preference name="SplashScreenDelay" value="10000" />
```
## Preferences ## Preferences
#### config.xml ### config.xml
- __AutoHideSplashScreen__ (boolean, default to `true`). Indicates whether to hide splash screen automatically or not. Splash screen hidden after amount of time specified in the `SplashScreenDelay` preference. - `SplashFullScreen` (boolean, default to `true`). 在app未设置全屏的情况下FadeSplash是否全屏显示
```xml ```xml
<preference name="AutoHideSplashScreen" value="true" /> <preference name="SplashFullScreen" value="true" />
``` ```
## Other
- __SplashScreenDelay__ (number, default to 3000). Amount of time in milliseconds to wait before automatically hide splash screen. - 关于android启动黑屏 请保持`SplashScreen`参数值为`screen`否则请修改`src/android/res/values/style.xml`中对应资源id
- 其他配置及插件使用方法请移步[cordova-plugin-splashscreen](https://github.com/apache/cordova-plugin-splashscreen.git)
```xml
<preference name="SplashScreenDelay" value="3000" />
```
### Android Quirks
In your `config.xml`, you need to add the following preferences:
```xml
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
<preference name="SplashShowOnlyFirstTime" value="true|false" />
```
The first parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms.
"SplashMaintainAspectRatio" preference is optional. If set to true, splash screen drawable is not stretched to fit screen, but instead simply "covers" the screen, like CSS "background-size:cover". This is very useful when splash screen images cannot be distorted in any way, for example when they contain scenery or text. This setting works best with images that have large margins (safe areas) that can be safely cropped on screens with different aspect ratios.
The plugin reloads splash drawable whenever orientation changes, so you can specify different drawables for portrait and landscape orientations.
"SplashShowOnlyFirstTime" preference is also optional and defaults to `true`. When set to `true` splash screen will only appear on application launch. However, if you plan to use `navigator.app.exitApp()` to close application and force splash screen appear on next launch, you should set this property to `false` (this also applies to closing the App with Back button).
### Browser Quirks
You can use the following preferences in your `config.xml`:
```xml
<platform name="browser">
<preference name="SplashScreen" value="/images/browser/splashscreen.jpg" /> <!-- defaults to "/img/logo.png" -->
<preference name="SplashScreenDelay" value="3000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
```
__Note__: `SplashScreen` value should be absolute in order to work in a sub-page. The `SplashScreen` value is used only for the browser platform. The value will be ignored for other platforms.
### Android and iOS Quirks
- In iOS, the splashscreen images are called launch images. These images are mandatory on iOS.
- `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to
prevent the splash screen from fading in and out when its display
state changes.
```xml
<preference name="FadeSplashScreen" value="false"/>
```
- `FadeSplashScreenDuration` (float, defaults to `3000`): Specifies the
number of milliseconds for the splash screen fade effect to execute.
```xml
<preference name="FadeSplashScreenDuration" value="3000"/>
```
Note also that this value used to be seconds, and not milliseconds, so values less than 30 will still be treated as seconds. ( Consider this a deprecated patch that will disapear in some future version. )
_Note_: `FadeSplashScreenDuration` is included into `SplashScreenDelay`, for example if you have `<preference name="SplashScreenDelay" value="3000" />` and `<preference name="FadeSplashScreenDuration" value="1000"/>` defined in `config.xml`:
- 00:00 - splashscreen is shown
- 00:02 - fading has started
- 00:03 - splashscreen is hidden
Turning the fading off via `<preference name="FadeSplashScreen" value="false"/>` technically means fading duration to be `0` so that in this example the overall splash delay will still be 3 seconds.
_Note_: This only applies to the app startup - you need to take the fading timeout into account when manually showing/hiding the splashscreen in the code:
```javascript
navigator.splashscreen.show();
window.setTimeout(function () {
navigator.splashscreen.hide();
}, splashDuration - fadeDuration);
```
- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false`
to hide the splash-screen spinner.
```xml
<preference name="ShowSplashScreenSpinner" value="false"/>
```
## Methods
- splashscreen.show
- splashscreen.hide
## splashscreen.hide
Dismiss the splash screen.
```js
navigator.splashscreen.hide();
```
### BlackBerry 10, WP8, iOS Quirk
The `config.xml` file's `AutoHideSplashScreen` setting must be
`false`. To delay hiding the splash screen for two seconds, add a
timer such as the following in the `deviceready` event handler:
```js
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
```
## splashscreen.show
Displays the splash screen.
```js
navigator.splashscreen.show();
```
Your application cannot call `navigator.splashscreen.show()` until the app has
started and the `deviceready` event has fired. But since typically the splash
screen is meant to be visible before your app has started, that would seem to
defeat the purpose of the splash screen. Providing some configuration in
`config.xml` will automatically `show` the splash screen immediately after your
app launch and before it has fully started and received the `deviceready`
event. For this reason, it is unlikely you need to call `navigator.splashscreen.show()` to make the splash
screen visible for app startup.
[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%20Splashscreen%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC

View File

@ -20,12 +20,72 @@
--> -->
# Release Notes # Release Notes
### 5.0.3 (May 09, 2019)
* Update CI configuration and README ([#210](https://github.com/apache/cordova-plugin-splashscreen/pull/210), [#208](https://github.com/apache/cordova-plugin-splashscreen/pull/208), [#198](https://github.com/apache/cordova-plugin-splashscreen/pull/198), [#194](https://github.com/apache/cordova-plugin-splashscreen/pull/194))
* Add or update GitHub pull request and issue template
* [CB-13826](https://issues.apache.org/jira/browse/CB-13826) Incremented plugin version.
* [CB-12277](https://issues.apache.org/jira/browse/CB-12277) (android) avoid NullPointerException on splashImageView when removing splashscreen
### 5.0.2 (Jan 24, 2018)
* [CB-13750](https://issues.apache.org/jira/browse/CB-13750) Add build-tools-26.0.2 to travis
* [CB-13737](https://issues.apache.org/jira/browse/CB-13737) (iOS): fix Splash screen images for iPhone X
### 5.0.1 (Dec 27, 2017)
* [CB-13709](https://issues.apache.org/jira/browse/CB-13709) Fix to allow 5.0.0 version install (#144)
### 5.0.0 (Dec 15, 2017)
* [CB-13677](https://issues.apache.org/jira/browse/CB-13677) Remove deprecated platforms
### 4.1.0 (Nov 06, 2017)
* [CB-13473](https://issues.apache.org/jira/browse/CB-13473) (CI) Removed **Browser** builds from AppVeyor
* [CB-12011](https://issues.apache.org/jira/browse/CB-12011) (android) added the possibility to change the spinner color on **Android 5.0**+ apps
* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor
* [CB-13094](https://issues.apache.org/jira/browse/CB-13094) (android) Don't show splash when activity being finished
* [CB-11487](https://issues.apache.org/jira/browse/CB-11487) (browser) Documented `AutoHideSplashScreen` for **Browser**
* [CB-11488](https://issues.apache.org/jira/browse/CB-11488) (browser) The `hide()` call became non re-entrant after the addition of fade out. This fixes the issue.
* [CB-11487](https://issues.apache.org/jira/browse/CB-11487) (browser) The standard `AutoHideSplashScreen` `config.xml` property is now supported by the **Browser** platform.
* [CB-11486](https://issues.apache.org/jira/browse/CB-11486) (browser) `splashScreenDelay` now feed through `parseInt` to ensure it is an integer by the time it's value is passed in to `setTimeout()` in `hide()`.
* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
### 4.0.3 (Apr 27, 2017)
* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README`
* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder
### 4.0.2 (Feb 28, 2017)
* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml`
* [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-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges
### 4.0.1 (Dec 07, 2016)
* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 4.0.1
* [CB-11751](https://issues.apache.org/jira/browse/CB-11751) 'extendedSplashScreen' is undefined Document that splashscreen needs to be disabled on Windows in case of updating entire document body
* [CB-9287](https://issues.apache.org/jira/browse/CB-9287) Not enough Icons and Splashscreens for **Windows 8.1** and Windows Phone 8.1
* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
* [CB-11830](https://issues.apache.org/jira/browse/CB-11830) (iOS) Fix doc typos in PR#114
* [CB-11829](https://issues.apache.org/jira/browse/CB-11829) (iOS) Support for CB-9762; docs (CB-11830)
* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
### 4.0.0 (Sep 08, 2016)
* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
* [CB-11326](https://issues.apache.org/jira/browse/CB-11326) Prevent crash when initializing plugin after navigating to another URL
* Fix crash on **iOS** when reloading page from remote **Safari**
* Add badges for paramedic builds on Jenkins
* Add pull request template.
* [CB-11179](https://issues.apache.org/jira/browse/CB-11179) Extend the windows-splashscreen docs
* [CB-11159](https://issues.apache.org/jira/browse/CB-11159) Fix flaky splashscreen native tests
* [CB-11156](https://issues.apache.org/jira/browse/CB-11156) Change default `FadeSplashScreenDuration` value
* [CB-8056](https://issues.apache.org/jira/browse/CB-8056) Updated the dependency version, added it to the docs
* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
* [CB-8056](https://issues.apache.org/jira/browse/CB-8056) Implement splashscreen for **Windows** platform
* [CB-6498](https://issues.apache.org/jira/browse/CB-6498) Misleading documentation in **Android** Quirks
### 3.2.2 (Apr 15, 2016) ### 3.2.2 (Apr 15, 2016)
* CB-10979 Fix splashscreen **iOS** native tests. Added `jshintignore` for tests/ios * [CB-10979](https://issues.apache.org/jira/browse/CB-10979) Fix splashscreen **iOS** native tests. Added `jshintignore` for tests/ios
* CB-10895 Transparent Splashscreen view sometimes remains * [CB-10895](https://issues.apache.org/jira/browse/CB-10895) Transparent Splashscreen view sometimes remains
* CB-10562 `hide()` not working in latest splashscreen plug in 3.1.0 in **iOS** * [CB-10562](https://issues.apache.org/jira/browse/CB-10562) `hide()` not working in latest splashscreen plug in 3.1.0 in **iOS**
* CB-10688 Plugin Splashscreen Readme must have examples. * [CB-10688](https://issues.apache.org/jira/browse/CB-10688) Plugin Splashscreen Readme must have examples.
* CB-10864 Run **iOS** native tests on Travis * [CB-10864](https://issues.apache.org/jira/browse/CB-10864) Run **iOS** native tests on Travis
### 3.2.1 (Mar 09, 2016) ### 3.2.1 (Mar 09, 2016)
* [CB-10764](https://issues.apache.org/jira/browse/CB-10764) Remove emoji in cordova-plugin-splashscreen * [CB-10764](https://issues.apache.org/jira/browse/CB-10764) Remove emoji in cordova-plugin-splashscreen
@ -42,14 +102,14 @@
* [CB-8396](https://issues.apache.org/jira/browse/CB-8396) Add AutoHideSplashScreen logic to Android's Splashscreen * [CB-8396](https://issues.apache.org/jira/browse/CB-8396) Add AutoHideSplashScreen logic to Android's Splashscreen
### 3.1.0 (Jan 15, 2016) ### 3.1.0 (Jan 15, 2016)
* CB-9538 Implementing `FadeSplashScreen` feature for **Android** * [CB-9538](https://issues.apache.org/jira/browse/CB-9538) Implementing `FadeSplashScreen` feature for **Android**
* CB-9240 Cordova splash screen plugin **iPad** landscape mode issue * [CB-9240](https://issues.apache.org/jira/browse/CB-9240) Cordova splash screen plugin **iPad** landscape mode issue
* CB-10263 Fix splashscreen plugin filenames for Asset Catalog * [CB-10263](https://issues.apache.org/jira/browse/CB-10263) Fix splashscreen plugin filenames for Asset Catalog
* CB-9374 **Android** add `SplashShowOnlyFirstTime` as preference * [CB-9374](https://issues.apache.org/jira/browse/CB-9374) **Android** add `SplashShowOnlyFirstTime` as preference
* CB-10244 Don't rotate the **iPhone 6 Plus** splash * [CB-10244](https://issues.apache.org/jira/browse/CB-10244) Don't rotate the **iPhone 6 Plus** splash
* CB-9043 Fix the **ios** splashscreen being deformed on orientation change * [CB-9043](https://issues.apache.org/jira/browse/CB-9043) Fix the **ios** splashscreen being deformed on orientation change
* CB-10079 Splashscreen plugin does not honor `SplashScreenDelay` on **iOS** * [CB-10079](https://issues.apache.org/jira/browse/CB-10079) Splashscreen plugin does not honor `SplashScreenDelay` on **iOS**
* CB-10231 Fix `FadeSplashScreen` to default to true on **iOS** * [CB-10231](https://issues.apache.org/jira/browse/CB-10231) Fix `FadeSplashScreen` to default to true on **iOS**
### 3.0.0 (Nov 18, 2015) ### 3.0.0 (Nov 18, 2015)
* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest * [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
@ -69,7 +129,7 @@
* [CB-3562](https://issues.apache.org/jira/browse/CB-3562): Disable screen rotation for iPhone when splash screen is shown. (closes #47) * [CB-3562](https://issues.apache.org/jira/browse/CB-3562): Disable screen rotation for iPhone when splash screen is shown. (closes #47)
* [CB-8988](https://issues.apache.org/jira/browse/CB-8988): Fix rotation on iOS/iPad (closes #46) * [CB-8988](https://issues.apache.org/jira/browse/CB-8988): Fix rotation on iOS/iPad (closes #46)
* [CB-8904](https://issues.apache.org/jira/browse/CB-8904): Don't reset the static variable when it's destroyed, otherwise we might as well just have a member variable * [CB-8904](https://issues.apache.org/jira/browse/CB-8904): Don't reset the static variable when it's destroyed, otherwise we might as well just have a member variable
* Removed wp7 from plugin.xml and package.json * Removed wp7 from `plugin.xml` and package.json
* [CB-8750](https://issues.apache.org/jira/browse/CB-8750) [wp8]: Rewrite resoultion helper * [CB-8750](https://issues.apache.org/jira/browse/CB-8750) [wp8]: Rewrite resoultion helper
* [CB-8750](https://issues.apache.org/jira/browse/CB-8750) [wp8]: Allow resolution-specific splashscreen images * [CB-8750](https://issues.apache.org/jira/browse/CB-8750) [wp8]: Allow resolution-specific splashscreen images
* [CB-8758](https://issues.apache.org/jira/browse/CB-8758) [wp8]: UnauthorizedAccessException on hide() * [CB-8758](https://issues.apache.org/jira/browse/CB-8758) [wp8]: UnauthorizedAccessException on hide()
@ -121,7 +181,7 @@
### 0.3.3 (Sep 17, 2014) ### 0.3.3 (Sep 17, 2014)
* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-splashscreen documentation translation * [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-splashscreen documentation translation
* Renamed test dir, added nested plugin.xml * Renamed test dir, added nested `plugin.xml`
* added documentation for manual tests * added documentation for manual tests
* [CB-7196](https://issues.apache.org/jira/browse/CB-7196) port splashscreen tests to framework * [CB-7196](https://issues.apache.org/jira/browse/CB-7196) port splashscreen tests to framework
@ -167,7 +227,7 @@
* [CB-5124](https://issues.apache.org/jira/browse/CB-5124) - Remove splashscreen config.xml values from iOS Configuration Docs, move to plugin docs * [CB-5124](https://issues.apache.org/jira/browse/CB-5124) - Remove splashscreen config.xml values from iOS Configuration Docs, move to plugin docs
### 0.2.4 (Oct 28, 2013) ### 0.2.4 (Oct 28, 2013)
* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): add repo + issue tag to plugin.xml for splashscreen plugin * [CB-5128](https://issues.apache.org/jira/browse/CB-5128): add repo + issue tag to `plugin.xml` for splashscreen plugin
* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. * [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch.
### 0.2.3 (Oct 9, 2013) ### 0.2.3 (Oct 9, 2013)

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung.
## Installation
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## Unterstützte Plattformen
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 und 8
* Windows 8
* Windows
* Browser
## Methoden
* SplashScreen.Show
* SplashScreen.Hide
### Android Eigenarten
Sie müssen in Ihrem `"config.xml"`fügen Sie die folgenden Einstellungen:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem res/xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html).
"SplashMaintainAspectRatio" Präferenz ist optional. Wenn wahr, Splash-Screen zeichenbaren nicht gestreckt wird, um den Bildschirm passen, sondern stattdessen einfach "" den Bildschirm, wie CSS abdeckt "Hintergrund-Größe: Schutz vor". Dies ist sehr nützlich, wenn Splash-Bildschirm Bilder können nicht, in keiner Weise, zum Beispiel verzerrt werden wenn sie Landschaft oder Text enthalten. Diese Einstellung funktioniert am besten mit Bildern, die große Margen (sichere Bereiche) haben, die sicher auf Bildschirme mit unterschiedlichen Seitenverhältnissen zugeschnitten werden können.
Das Plugin lädt platsch zeichenbaren wenn Ausrichtung ändert, sodass Sie verschiedene Drawables für hoch- und Querformat Ausrichtungen angeben können.
### Browser-Eigenheiten
In Ihrem `"config.xml"`können Sie die folgenden Einstellungen:
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### iOS Macken
* `FadeSplashScreen` (Boolean, standardmäßig auf `true festgelegt`): um zu verhindern, dass den Begrüßungsbildschirm ein-und ausblenden bei ihrer Anzeige Statusänderungen auf `false` festgelegt.
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration` (float, Standardwert ist `2`): gibt die Anzahl der Sekunden für den Begrüßungsbildschirm fade Effekt ausgeführt.
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner` (Boolean, standardmäßig auf `true festgelegt`): auf `false` festgelegt wird, um den Begrüßungsbildschirm Spinner auszublenden.
<preference name="ShowSplashScreenSpinner" value="false"/>
## SplashScreen.Hide
Schließen Sie den Splash-Screen.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Eigenarten
Die Datei `config.xml` `AutoHideSplashScreen` Einstellung muss `false` sein. Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready`-Ereignishandler:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## SplashScreen.Show
Zeigt den Begrüßungsbildschirm.
navigator.splashscreen.show();
Ihre Anwendung kann nicht `navigator.splashscreen.show()` aufrufen, bis die app begonnen hat und das `deviceready`-Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in der Datei `config.xml` werden automatisch die Splash `show` sofort nach Ihrer app-Start und Bildschirm bevor es voll begonnen hat, und das `deviceready`-Ereignis empfangen. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). Aus diesem Grund ist es unwahrscheinlich, dass Sie `navigator.splashscreen.show()` damit den Splash-Screen sichtbar ist für app-Start aufrufen müssen.

View File

@ -1,78 +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-splashscreen
Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung.
## Installation
cordova plugin add cordova-plugin-splashscreen
## Unterstützte Plattformen
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 und 8
* Windows 8
## Methoden
* SplashScreen.Show
* SplashScreen.Hide
### Android Eigenarten
Sie müssen in der config.xml folgende Einstellungen vornehmen:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem res/xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens][1].
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## SplashScreen.Hide
Schließen Sie den Splash-Screen.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Eigenarten
Die Datei `config.xml` `AutoHideSplashScreen` Einstellung muss `false` sein. Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready`-Ereignishandler:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## SplashScreen.Show
Zeigt den Begrüßungsbildschirm.
navigator.splashscreen.show();
Ihre Anwendung kann nicht `navigator.splashscreen.show()` aufrufen, bis die app begonnen hat und das `deviceready`-Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in der Datei `config.xml` werden automatisch die Splash `show` sofort nach Ihrer app-Start und Bildschirm bevor es voll begonnen hat, und das `deviceready`-Ereignis empfangen. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1]. Aus diesem Grund ist es unwahrscheinlich, dass Sie `navigator.splashscreen.show()` damit den Splash-Screen sichtbar ist für app-Start aufrufen müssen.

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación.
## Instalación
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## Plataformas soportadas
* Amazon fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 y 8
* Windows 8
* Windows
* Explorador
## Métodos
* splashscreen.show
* splashscreen.hide
### Rarezas Android
En el `archivo config.xml`, es necesario agregar las siguientes preferencias:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) para obtener más información.
Preferencia "SplashMaintainAspectRatio" es opcional. Si establece en true, pantalla dibujable no es estirado para caber la pantalla, pero en su lugar simplemente "cover" la pantalla, como CSS "background-size: cover". Esto es muy útil cuando las imágenes de pantallas splash no distorsionadas de cualquier manera, por ejemplo cuando contienen texto o paisaje. Esta opción funciona mejor con imágenes que tienen bordes grandes (zonas seguras) que pueden ser recortadas con seguridad en pantallas con diferentes relaciones de aspecto.
El plugin recarga splash dibujable cuando cambia de orientación, por lo que puede especificar diferente dibujo para orientaciones vertical y horizontal.
### Navegador rarezas
Puede utilizar las siguientes preferencias en el `archivo config.xml`:
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### iOS rarezas
* `FadeSplashScreen` (booleano, por defecto `true`): establecida en `false` para evitar que la pantalla de bienvenida de descolorarse adentro y hacia fuera cuando cambia su estado de presentación.
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration` (float, por defecto es `2`): especifica el número de segundos para que la pantalla se descolora efecto para ejecutar.
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner` (booleano, por defecto `true`): establecida en `false` para ocultar la ruleta de la pantalla de bienvenida.
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.hide
Despedir a la pantalla de bienvenida.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Quirk
El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
Muestra la pantalla de bienvenida.
navigator.splashscreen.show();
La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación.

View File

@ -1,76 +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-splashscreen
Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación.
## Instalación
cordova plugin add cordova-plugin-splashscreen
## Plataformas soportadas
* Amazon fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 y 8
* Windows 8
## Métodos
* splashscreen.show
* splashscreen.hide
### Rarezas Android
En el archivo config.xml, tienes que añadir las siguientes preferencias:
< nombre de preferencia = "SplashScreen" value = "foo" / >< nombre de preferencia = "SplashScreenDelay" value = "10000" / >
Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas][1] para obtener más información.
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.hide
Despedir a la pantalla de bienvenida.
Navigator.SplashScreen.Hide();
### BlackBerry 10, WP8, iOS Quirk
El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos:
setTimeout(function() {navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
Muestra la pantalla de bienvenida.
Navigator.SplashScreen.Show();
La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas][1] para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación.

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application.
## Installation
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## Plates-formes supportées
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 et 8
* Windows 8
* Windows
* Navigateur
## Méthodes
* splashscreen.Show
* splashscreen.Hide
### Quirks Android
Dans votre `fichier config.xml`, vous devez ajouter les préférences suivantes :
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html).
Préférence de « SplashMaintainAspectRatio » est facultative. Si défini à true, écran de démarrage drawable n'est pas étirée pour s'adapter écran, mais plutôt simplement « couvre » l'écran, comme CSS "fond-taille : couverture". Ceci est très utile lorsque images écran de démarrage ne peut pas être déformées en quelque sorte, par exemple lorsqu'ils contiennent des décors ou texte. Ce paramètre fonctionne mieux avec des images qui ont des marges importantes (zones de sécurité) qui peuvent être recadrées en toute sécurité sur les écrans avec des proportions différentes.
Le plugin recharge splash drawable chaque fois que l'orientation change, donc vous pouvez spécifier différents drawables pour les orientations portrait et paysage.
### Bizarreries navigateur
Vous pouvez utiliser les préférences suivantes dans votre `fichier config.xml`:
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### Notes au sujet d'iOS
* `FadeSplashScreen` (boolean, par défaut est `true`): la valeur `false` pour empêcher l'écran de démarrage de fading in et out lorsque son état d'affichage est modifié.
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration` (float, la valeur par défaut `2`): spécifie le nombre de secondes que l'écran de démarrage s'estomper l'effet d'exécuter.
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner` (boolean, par défaut est `true`): la valeur `false` pour masquer le cône de l'écran de démarrage.
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.Hide
Faire disparaître de l'écran de démarrage.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Quirk
Paramètre `AutoHideSplashScreen` du fichier `config.xml` doit avoir la valeur `false`. Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur semblable à la suivante dans le gestionnaire d'événements `deviceready` :
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.Show
Affiche l'écran de démarrage.
navigator.splashscreen.show();
Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et l'événement `deviceready` est déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration dans le fichier `config.xml` automatiquement `show` le splash projettera immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu l'événement `deviceready`. Voir les [icônes et les écrans de démarrage](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application.

View File

@ -1,78 +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-splashscreen
Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application.
## Installation
cordova plugin add cordova-plugin-splashscreen
## Plates-formes prises en charge
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 et 8
* Windows 8
## Méthodes
* splashscreen.Show
* splashscreen.Hide
### Quirks Android
Dans votre fichier config.xml, vous devez ajouter les préférences suivantes :
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage][1].
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.Hide
Faire disparaître de l'écran de démarrage.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Quirk
Paramètre `AutoHideSplashScreen` du fichier `config.xml` doit avoir la valeur `false`. Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur semblable à la suivante dans le gestionnaire d'événements `deviceready` :
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.Show
Affiche l'écran de démarrage.
navigator.splashscreen.show();
Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et l'événement `deviceready` est déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration dans le fichier `config.xml` automatiquement `show` le splash projettera immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu l'événement `deviceready`. Voir les [icônes et les écrans de démarrage][1] pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application.

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione.
## Installazione
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## Piattaforme supportate
* Amazon fuoco OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 e 8
* Windows 8
* Windows
* Browser
## Metodi
* splashscreen
* splashscreen.Hide
### Stranezze Android
Nel vostro `config. XML`, è necessario aggiungere le seguenti preferenze:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html).
"SplashMaintainAspectRatio" preferenza è facoltativo. Se impostato su true, schermata iniziale drawable non viene adattata per misura lo schermo, ma invece semplicemente "copre" lo schermo, come CSS "sfondo-dimensione: copertina". Questo è molto utile quando immagini schermata iniziale non possono essere distorta in qualche modo, per esempio quando contengono testo o scenario. Questa impostazione funziona meglio con immagini che hanno grandi margini (zone sicure) che possono essere ritagliati in modo sicuro su schermi con proporzioni diverse.
Il plugin viene ricaricata splash drawable ogni volta che cambia orientamento, è possibile specificare diversi parte per orientamento verticale e orizzontale.
### Stranezze browser
Nel vostro `config. XML`, è possibile utilizzare le seguenti preferenze:
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### iOS stranezze
* `FadeSplashScreen` (boolean, impostazioni predefinite a `true`): impostare su `false` per impedire che la schermata iniziale e scompaiono quando cambia il relativo stato di visualizzazione.
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration` (float, il valore predefinito è `2`): specifica il numero di secondi per la schermata iniziale dissolvenza effetto da eseguire.
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner` (boolean, impostazioni predefinite a `true`): impostare su `false` per nascondere la filatrice schermata iniziale.
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.Hide
Respingere la schermata iniziale.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Quirk
Impostazione `AutoHideSplashScreen` del file `config.xml` deve essere `false`. Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel gestore eventi `deviceready`:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen
Visualizza la schermata iniziale.
navigator.splashscreen.show();
L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando l'app ha iniziato e ha generato l'evento `deviceready`. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione nel `file config.xml` sarà automaticamente `show` il tonfo schermo subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto l'evento `deviceready`. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app.

View File

@ -1,78 +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-splashscreen
Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione.
## Installazione
cordova plugin add cordova-plugin-splashscreen
## Piattaforme supportate
* Amazon fuoco OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 e 8
* Windows 8
## Metodi
* splashscreen
* splashscreen.Hide
### Stranezze Android
Nel vostro config. xml, è necessario aggiungere le seguenti preferenze:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali][1].
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.Hide
Respingere la schermata iniziale.
navigator.splashscreen.hide();
### BlackBerry 10, WP8, iOS Quirk
Impostazione `AutoHideSplashScreen` del file `config.xml` deve essere `false`. Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel gestore eventi `deviceready`:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen
Visualizza la schermata iniziale.
navigator.splashscreen.show();
L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando l'app ha iniziato e ha generato l'evento `deviceready`. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione nel `file config.xml` sarà automaticamente `show` il tonfo schermo subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto l'evento `deviceready`. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali][1]. Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app.

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
このプラグインが表示され、アプリケーションの起動中にスプラッシュ スクリーンを非表示にします。
## インストール
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* ブラックベリー 10
* iOS
* Windows Phone 7 と 8
* Windows 8
* Windows
* ブラウザー
## メソッド
* splashscreen.show
* splashscreen.hide
### Android の癖
あなたの`config.xml`内の次の設定を追加する必要があります。
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
Foo ができれば 9 パッチファイル splashscreen ファイルの名前です。 解像度/xml ディレクトリの適切なフォルダーの下に splashcreen ファイルを追加することを確認します。 2 番目のパラメーターは、スプラッシュ ・ スクリーンがの表示時間 (ミリ秒単位) を表します。 デフォルトでは 3000 ミリ秒です。 詳細については、[アイコンとスプラッシュ画面](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) を参照してください。
"SplashMaintainAspectRatio"の設定はオプションです。 True の場合、スプラッシュ画面描画に設定画面を埋めるために拡大されませんが、代わりに単に「カバー」画面では、CSS のような場合「背景-サイズ: カバー」. これは、たとえば風景またはテキストが含まれている場合、任意の方法でスプラッシュ画面画像が歪むことができない非常に便利です。 この設定は、画面と異なる縦横比で安全にトリミングすることができます大規模なマージン (安全な地域) の画像に適しています。
縦長と横長の異なるドロウアブルを指定できるように、プラグインは向きを変更するたびにスプラッシュ ドロウアブルをリロードします。
### ブラウザーの癖
あなたの`config.xml`で次の設定を使用できます。
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### iOS の癖
* `FadeSplashScreen`(ブール値、既定で [ `true`): スプラッシュ画面がフェードインとフェードアウトの表示状態が変更されたときすることを防ぐために`false`に設定します。
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration`(float, デフォルトは`2`): スプラッシュ画面の秒数のフェードを実行する効果を指定します。
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner`(ブール値、既定で [ `true`): スプラッシュ スクリーン スピナーを非表示にするを`false`に設定します。
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.hide
スプラッシュ スクリーンを閉じます。
navigator.splashscreen.hide();
### ブラックベリー 10、WP8、iOS の気まぐれ
`config.xml` ファイルの `AutoHideSplashScreen` の設定は `false` である必要があります。 遅延を 2 秒間スプラッシュ スクリーンを非表示に `deviceready` イベント ハンドラーで、次のようタイマーを追加します。
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
スプラッシュ画面が表示されます。
navigator.splashscreen.show();
アプリが開始され、`deviceready` イベントが発生するまで、アプリケーションは `navigator.splashscreen.show()` を呼び出すことはできません。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 `config.xml` にいくつかの構成を提供するは自動的に `表示` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、`deviceready` イベントを受信する前に。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) を参照してください。 この理由のためにアプリ起動時のスプラッシュ スクリーンを確認 `navigator.splashscreen.show()` をコールする必要がある可能性が高いです。

View File

@ -1,78 +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-splashscreen
このプラグインが表示され、アプリケーションの起動中にスプラッシュ スクリーンを非表示にします。
## インストール
cordova plugin add cordova-plugin-splashscreen
## サポートされているプラットフォーム
* アマゾン火 OS
* アンドロイド
* ブラックベリー 10
* iOS
* Windows Phone 7 と 8
* Windows 8
## メソッド
* splashscreen.show
* splashscreen.hide
### Android の癖
あなたの config.xml を以下の設定を追加する必要があります。
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
Foo ができれば 9 パッチファイル splashscreen ファイルの名前です。 解像度/xml ディレクトリの適切なフォルダーの下に splashcreen ファイルを追加することを確認します。 2 番目のパラメーターは、スプラッシュ ・ スクリーンがの表示時間 (ミリ秒単位) を表します。 デフォルトでは 3000 ミリ秒です。 詳細については、[アイコンとスプラッシュ画面][1] を参照してください。
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.hide
スプラッシュ スクリーンを閉じます。
navigator.splashscreen.hide();
### ブラックベリー 10、WP8、iOS の気まぐれ
`config.xml` ファイルの `AutoHideSplashScreen` の設定は `false` である必要があります。 遅延を 2 秒間スプラッシュ スクリーンを非表示に `deviceready` イベント ハンドラーで、次のようタイマーを追加します。
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
スプラッシュ画面が表示されます。
navigator.splashscreen.show();
アプリが開始され、`deviceready` イベントが発生するまで、アプリケーションは `navigator.splashscreen.show()` を呼び出すことはできません。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 `config.xml` にいくつかの構成を提供するは自動的に `表示` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、`deviceready` イベントを受信する前に。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面][1] を参照してください。 この理由のためにアプリ起動時のスプラッシュ スクリーンを確認 `navigator.splashscreen.show()` をコールする必要がある可能性が高いです。

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
이 플러그인은 표시 하 고 응용 프로그램 실행 하는 동안 시작 화면을 숨깁니다.
## 설치
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## 지원 되는 플랫폼
* 아마존 화재 운영 체제
* 안 드 로이드
* 블랙베리 10
* iOS
* Windows Phone 7과 8
* 윈도우 8
* 윈도우
* 브라우저
## 메서드
* splashscreen.show
* splashscreen.hide
### 안 드 로이드 단점
`Config.xml`에 다음 환경 설정에 추가 해야 합니다.
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
여기서 foo splashscreen 파일, 선호 9 패치 파일의 이름입니다. 적절 한 폴더 아래 res/xml 디렉토리에 splashcreen 파일을 추가 해야 합니다. 두 번째 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 됩니다 나타냅니다. 3000 ms 기본값으로 사용 됩니다. 자세한 내용은 [아이콘 및 시작 화면을](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) 참조 하십시오.
"SplashMaintainAspectRatio" 취향은 선택 사항입니다. Drawable, 시작 화면 설정 화면에 맞게 확장 되지 하지만 대신 단순히 "커버" CSS 같은 화면 "배경-크기: 덮개". 시작 화면 이미지 예: 풍경 또는 텍스트를 포함 하는 경우 어떤 식으로든에서 왜곡 될 수 없는 경우에 매우 유용 합니다. 이 설정은 큰 여백 (안전 지역) 안전 하 게 다른 종횡비와 화면에 자를 수 있는 이미지에 가장 적합 합니다.
플러그인 다시 로드 스플래시 drawable 방향이 변경 될 때마다 세로 및 가로 방향에 대 한 다른 drawables를 지정할 수 있도록 합니다.
### 브라우저 만지면
`Config.xml`에 다음 기본 설정을 사용할 수 있습니다.
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### iOS 단점
* `FadeSplashScreen` (부울 `true`로 기본값): 시작 화면 표시 상태로 변경 될 때 밖으로 퇴색 하지 않도록 하려면 `false` 로 설정.
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration` (부동, `2`기본값): 시작 화면에 대 한 초 페이드 효과를 실행 하는 지정 합니다.
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner` (부울 `true`로 기본값): 스플래시 화면 회전자를 숨기려면 `false` 로 설정.
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.hide
시작 화면을 닫습니다.
navigator.splashscreen.hide();
### 블랙베리 10, WP8, iOS 특질
`config.xml` 파일의 `AutoHideSplashScreen` 설정을 `false` 여야 합니다. 2 초 동안 시작 화면을 숨기고 지연, `deviceready` 이벤트 처리기에서 다음과 같은 타이머를 추가:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
시작 화면을 표시합니다.
navigator.splashscreen.show();
응용 프로그램 시작 및 `deviceready` 이벤트는 발생 될 때까지 응용 프로그램이 `navigator.splashscreen.show()`을 호출할 수 없습니다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. `config.xml에서` 몇 가지 구성을 제공 하 자동으로 스플래시 `표시` 화면 애플 리 케이 션 출시 직후와 그것은 완벽 하 게 시작 하 고 `deviceready` 이벤트를 받은 전에. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html) 참조 하십시오. 이러한 이유로, 그것은 가능성이 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 `navigator.splashscreen.show()`를 호출 해야입니다.

View File

@ -1,78 +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-splashscreen
이 플러그인은 표시 하 고 응용 프로그램 실행 하는 동안 시작 화면을 숨깁니다.
## 설치
cordova plugin add cordova-plugin-splashscreen
## 지원 되는 플랫폼
* 아마존 화재 운영 체제
* 안 드 로이드
* 블랙베리 10
* iOS
* Windows Phone 7과 8
* 윈도우 8
## 메서드
* splashscreen.show
* splashscreen.hide
### 안 드 로이드 단점
당신의 config.xml에 다음 환경 설정에 추가 해야 합니다.
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
여기서 foo splashscreen 파일, 선호 9 패치 파일의 이름입니다. 적절 한 폴더 아래 res/xml 디렉토리에 splashcreen 파일을 추가 해야 합니다. 두 번째 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 됩니다 나타냅니다. 3000 ms 기본값으로 사용 됩니다. 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오.
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.hide
시작 화면을 닫습니다.
navigator.splashscreen.hide();
### 블랙베리 10, WP8, iOS 특질
`config.xml` 파일의 `AutoHideSplashScreen` 설정을 `false` 여야 합니다. 2 초 동안 시작 화면을 숨기고 지연, `deviceready` 이벤트 처리기에서 다음과 같은 타이머를 추가:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
시작 화면을 표시합니다.
navigator.splashscreen.show();
응용 프로그램 시작 및 `deviceready` 이벤트는 발생 될 때까지 응용 프로그램이 `navigator.splashscreen.show()`을 호출할 수 없습니다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. `config.xml에서` 몇 가지 구성을 제공 하 자동으로 스플래시 `표시` 화면 애플 리 케이 션 출시 직후와 그것은 완벽 하 게 시작 하 고 `deviceready` 이벤트를 받은 전에. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. 이러한 이유로, 그것은 가능성이 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 `navigator.splashscreen.show()`를 호출 해야입니다.

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
## Instalacja
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## Obsługiwane platformy
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 i 8
* Windows 8
* Windows
* Przeglądarka
## Metody
* splashscreen.show
* splashscreen.Hide
### Dziwactwa Androida
W pliku `config.xml`musisz dodać następujące preferencje:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
Gdzie foo jest nazwą pliku ekranu powitalnego, najlepiej 9 łatce. Upewnij się dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak długo ekranu powitalnego pojawi się w milisekundach. Domyślnie 3000 ms. Aby uzyskać więcej informacji, zobacz [ikony i ekrany powitalne w aplikacjach](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html).
"SplashMaintainAspectRatio" preferencji jest opcjonalne. Jeśli zestaw na wartość true, ekran powitalny dolarowe nie jest rozciągnięty do ekranów, ale zamiast po prostu "obejmuje" ekranu, jak CSS "tło-rozmiar: okładka". Jest to bardzo przydatne, kiedy opryskać tęcza obrazy nie zniekształcony w jakikolwiek sposób, na przykład, gdy zawierają one dekoracje lub tekst. To ustawienie działa najlepiej z obrazów, które mają duże marginesy (bezpiecznych obszarów), które mogą być bezpiecznie przycięte na ekrany z różnych proporcji.
Plugin ładuje rozchlapać dolarowe, gdy zmienia orientację, tak można określić różnych drawables do orientacji pionowej i poziomej.
### Quirks przeglądarki
W pliku `config.xml`można użyć następujące preferencje:
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### Dziwactwa iOS
* `FadeSplashScreen` (wartość logiczna, domyślnie `true`): zestaw na `false` , aby zapobiec Znikająca i odkładane po zmianie stanu wyświetlania ekranu powitalnego.
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration` (float, domyślnie `2`): określa liczbę sekund dla ekranu powitalnego zanikanie efekt do wykonać.
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner` (wartość logiczna, domyślnie `true`): zestaw na `false` , aby ukryć pokrętła ekran powitalny.
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.Hide
Odrzucić ten opryskaæ têcza.
navigator.splashscreen.hide();
### Jeżyna 10, WP8, iOS dziwactwo
Plik `config.xml` `AutoHideSplashScreen` ustawienie musi być `false`. Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer następujących w `deviceready` obsługa zdarzeń:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
Wyświetla ekran powitalny.
navigator.splashscreen.show();
Aplikacja nie można wywołać `navigator.splashscreen.show()`, aż aplikacja została uruchomiona i zdarzenie `deviceready` został zwolniony. Ale ponieważ zazwyczaj opryskać tęcza ma być widoczne przed rozpoczęciem aplikacji, wydaje się sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `pliku config.xml` będzie automatycznie `show` splash na ekranie natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i odebrał zdarzenie `deviceready`. Aby uzyskać więcej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html). Z tego powodu jest mało prawdopodobne, należy zadzwonić `navigator.splashscreen.show()`, aby wyświetlić ekran powitalny dla uruchamiania aplikacji.

View File

@ -1,78 +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-splashscreen
Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
## Instalacja
cordova plugin add cordova-plugin-splashscreen
## Obsługiwane platformy
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 i 8
* Windows 8
## Metody
* splashscreen.show
* splashscreen.Hide
### Dziwactwa Androida
W pliku config.xml musisz dodać następujące preferencje:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
Gdzie foo jest nazwą pliku ekranu powitalnego, najlepiej 9 łatce. Upewnij się dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak długo ekranu powitalnego pojawi się w milisekundach. Domyślnie 3000 ms. Aby uzyskać więcej informacji, zobacz [ikony i ekrany powitalne w aplikacjach][1].
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.Hide
Odrzucić ten opryskaæ têcza.
navigator.splashscreen.hide();
### Jeżyna 10, WP8, iOS dziwactwo
Plik `config.xml` `AutoHideSplashScreen` ustawienie musi być `false`. Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer następujących w `deviceready` obsługa zdarzeń:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
Wyświetla ekran powitalny.
navigator.splashscreen.show();
Aplikacja nie można wywołać `navigator.splashscreen.show()`, aż aplikacja została uruchomiona i zdarzenie `deviceready` został zwolniony. Ale ponieważ zazwyczaj opryskać tęcza ma być widoczne przed rozpoczęciem aplikacji, wydaje się sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `pliku config.xml` będzie automatycznie `show` splash na ekranie natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i odebrał zdarzenie `deviceready`. Aby uzyskać więcej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach][1]. Z tego powodu jest mało prawdopodobne, należy zadzwonić `navigator.splashscreen.show()`, aby wyświetlić ekran powitalny dla uruchamiania aplikacji.

View File

@ -1,75 +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-splashscreen
Этот плагин отображает и скрывает экран-заставку при запуске приложения.
## Установка
cordova plugin add cordova-plugin-splashscreen
## Поддерживаемые платформы
* Amazon Fire OS
* Android
* BlackBerry 10
* iOS
* Windows Phone 7 и 8
* Windows 8
## Методы
* splashscreen.show
* splashscreen.hide
### Особенности Android
В вашем файле config.xml необходимо добавить следующие настройки:
`<preference name="SplashScreen" value="foo" />` `<preference name="SplashScreenDelay" value="10000" />`
Где foo это имя файла splashscreen, желательно 9 заплатку. Убедитесь в том добавить ваши splashcreen файлы в папку res/xml в соответствующие папки. Второй параметр представляет, как долго splashscreen появится в миллисекундах. По умолчанию он 3000 МС. Увидеть [иконки и заставки][1] для получения дополнительной информации.
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.hide
Закройте экран-заставка.
Navigator.SplashScreen.Hide();
### Особенности BlackBerry 10, WP8, iOS
`config.xml`Файла `AutoHideSplashScreen` должен быть `false` . Для задержки скрытия заставки на две секунды, добавить таймер, например в `deviceready` обработчик событий:
setTimeout(function() {navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
Отображает экран-заставку.
Navigator.SplashScreen.Show();
Ваше приложение не может вызвать `navigator.splashscreen.show()` до тех пор, пока приложение началась и `deviceready` событие инициировано. Но поскольку обычно экран-заставка должен быть видимым до начала вашего приложения, что казалось бы поражение цели экрана-заставки. Предоставление некоторых конфигурации в `config.xml` будет автоматически `show` экран-заставку сразу же после запуска вашего приложения и перед его полностью запущен и получил `deviceready` событие. Увидеть [иконки и заставки][1] для получения дополнительной информации на делать этой конфигурации. По этой причине маловероятно, вам нужно вызвать `navigator.splashscreen.show()` для отображения экрана-заставки для запуска приложения.

View File

@ -1,119 +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-splashscreen
[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg)](https://travis-ci.org/apache/cordova-plugin-splashscreen)
這個外掛程式顯示和隱藏在應用程式啟動期間的初始螢幕。
## 安裝
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## 支援的平臺
* 亞馬遜火 OS
* Android 系統
* 黑莓 10
* iOS
* Windows Phone 7 和 8
* Windows 8
* Windows
* 瀏覽器
## 方法
* splashscreen.show
* splashscreen.hide
### Android 的怪癖
在你的`config.xml`,您需要添加以下優惠:
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="SplashMaintainAspectRatio" value="true|false" />
美孚在哪裡閃屏檔,最好是 9 修補程式檔的名稱。 請確保您的 splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 第二個參數表示多久閃屏會顯示以毫秒為單位。 它將預設為 3000 毫秒。 有關更多資訊,請參見 [圖示和啟動畫面](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)。
"SplashMaintainAspectRatio"首選項是可選的。 如果設置為 true可繪製的初始螢幕不會拉伸以適合螢幕但相反只是"覆蓋"螢幕,像 CSS"背景-大小: 蓋"。 這是非常有用的不能以任何方式,例如當他們包含文本或風景畸變閃屏圖像時。 此設置適用于有大利潤 (安全區),可以安全地裁剪不同長寬比與螢幕上的圖像。
該外掛程式重新載入初始可繪製只要方向發生變化,所以您可以指定不同的畫板為縱向和橫向方向。
### 瀏覽器的怪癖
你可以用你的`config.xml`下列優先選項:
<platform name="browser">
<preference name="SplashScreen" value="images/browser/splashscreen.jpg" /> <!-- defaults to "img/logo.png" -->
<preference name="SplashScreenDelay" value="10000" /> <!-- defaults to "3000" -->
<preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
<preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
<preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
<preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>
### iOS 的怪癖
* `FadeSplashScreen`(預設為`true`的布林值): 設置為`false` ,以防止出現閃屏衰落和退出其顯示狀態發生變化時。
<preference name="FadeSplashScreen" value="false"/>
* `FadeSplashScreenDuration`(float預設為`2`): 指定的閃屏秒數淡出效果來執行。
<preference name="FadeSplashScreenDuration" value="4"/>
* `ShowSplashScreenSpinner`(boolean, `true`的布林值): 設置為`false`來隱藏初始螢幕微調框。
<preference name="ShowSplashScreenSpinner" value="false"/>
## splashscreen.hide
解雇的閃屏。
navigator.splashscreen.hide();
### 黑莓 10WP8iOS 怪癖
`config.xml``AutoHideSplashScreen` 設置必須是 `假` 的。 若要延遲兩秒鐘隱藏的閃屏,`deviceready` 事件處理常式中添加一個計時器,如下所示:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
顯示初始螢幕。
navigator.splashscreen.show();
您的應用程式無法調用 `navigator.splashscreen.show()`,直到該應用程式已啟動,且觸發了 `deviceready` 事件。 但是,由於通常的閃屏為了是可見的在您的應用程式啟動之前,這似乎會打敗閃屏的目的。 提供一些配置在 `config.xml` 中的會自動 `show` 初始螢幕您的應用程式啟動後立即和之前它已經完全起步並收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱 [圖示和啟動畫面](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)。 出於此原因,不太可能您需要調用 `navigator.splashscreen.show()`,使初始螢幕可見為應用程式啟動。

View File

@ -1,78 +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-splashscreen
這個外掛程式顯示和隱藏在應用程式啟動期間的初始螢幕。
## 安裝
cordova plugin add cordova-plugin-splashscreen
## 支援的平臺
* 亞馬遜火 OS
* Android 系統
* 黑莓 10
* iOS
* Windows Phone 7 和 8
* Windows 8
## 方法
* splashscreen.show
* splashscreen.hide
### Android 的怪癖
在你的 config.xml您需要添加以下優惠
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
美孚在哪裡閃屏檔,最好是 9 修補程式檔的名稱。 請確保您的 splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 第二個參數表示多久閃屏會顯示以毫秒為單位。 它將預設為 3000 毫秒。 有關更多資訊,請參見 [圖示和啟動畫面][1]。
[1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
## splashscreen.hide
解雇的閃屏。
navigator.splashscreen.hide();
### 黑莓 10WP8iOS 怪癖
`config.xml``AutoHideSplashScreen` 設置必須是 `假` 的。 若要延遲兩秒鐘隱藏的閃屏,`deviceready` 事件處理常式中添加一個計時器,如下所示:
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
## splashscreen.show
顯示初始螢幕。
navigator.splashscreen.show();
您的應用程式無法調用 `navigator.splashscreen.show()`,直到該應用程式已啟動,且觸發了 `deviceready` 事件。 但是,由於通常的閃屏為了是可見的在您的應用程式啟動之前,這似乎會打敗閃屏的目的。 提供一些配置在 `config.xml` 中的會自動 `show` 初始螢幕您的應用程式啟動後立即和之前它已經完全起步並收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱 [圖示和啟動畫面][1]。 出於此原因,不太可能您需要調用 `navigator.splashscreen.show()`,使初始螢幕可見為應用程式啟動。

View File

@ -1,52 +1,51 @@
{ {
"name": "cordova-plugin-splashscreen", "name": "cordova-plugin-splashscreen",
"version": "3.2.2", "version": "5.0.4-dev",
"description": "Cordova Splashscreen Plugin", "description": "Cordova Splashscreen Plugin",
"types": "./types/index.d.ts",
"cordova": { "cordova": {
"id": "cordova-plugin-splashscreen", "id": "cordova-plugin-splashscreen",
"platforms": [ "platforms": [
"android", "android",
"amazon-fireos",
"ubuntu", "ubuntu",
"ios", "ios",
"blackberry10",
"wp8",
"windows8",
"windows", "windows",
"tizen" "browser"
] ]
}, },
"repository": { "repository": "github:apache/cordova-plugin-splashscreen",
"type": "git", "bugs": "https://github.com/apache/cordova-plugin-splashscreen/issues",
"url": "https://github.com/apache/cordova-plugin-splashscreen"
},
"keywords": [ "keywords": [
"cordova", "cordova",
"splashscreen", "splashscreen",
"ecosystem:cordova", "ecosystem:cordova",
"cordova-android", "cordova-android",
"cordova-amazon-fireos",
"cordova-ubuntu",
"cordova-ios", "cordova-ios",
"cordova-blackberry10", "cordova-windows"
"cordova-wp8",
"cordova-windows8",
"cordova-windows",
"cordova-tizen"
], ],
"scripts": { "scripts": {
"test": "npm run jshint", "test": "npm run jshint",
"jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests"
}, },
"engines": [ "engines": {
{ "cordovaDependencies": {
"name": "cordova-android", "2.0.0": {
"version": ">=3.6.0" "cordova-android": ">=3.6.0"
} },
], "4.0.0": {
"cordova-android": ">=3.6.0",
"cordova-windows": ">=4.4.0"
},
"6.0.0": {
"cordova": ">100"
}
},
"node": ">=6.0.0"
},
"author": "Apache Software Foundation", "author": "Apache Software Foundation",
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"jshint": "^2.6.0" "jshint": "^2.6.0"
} },
"homepage": "https://cordova.apache.org/"
} }

View File

@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-splashscreen" id="cordova-plugin-splashscreen"
version="3.2.2"> version="5.0.4-dev">
<name>Splashscreen</name> <name>Splashscreen</name>
<description>Cordova Splashscreen Plugin</description> <description>Cordova Splashscreen Plugin</description>
<license>Apache 2.0</license> <license>Apache 2.0</license>
@ -30,6 +30,7 @@
<engines> <engines>
<engine name="cordova-android" version=">=3.6.0" /><!-- Requires CordovaPlugin.preferences --> <engine name="cordova-android" version=">=3.6.0" /><!-- Requires CordovaPlugin.preferences -->
<engine name="cordova-windows" version=">=4.4.0" />
</engines> </engines>
<js-module src="www/splashscreen.js" name="SplashScreen"> <js-module src="www/splashscreen.js" name="SplashScreen">
@ -44,25 +45,12 @@
<param name="onload" value="true"/> <param name="onload" value="true"/>
</feature> </feature>
</config-file> </config-file>
<edit-config file="AndroidManifest.xml" target="/manifest/application/activity[@android:name='MainActivity']" mode="merge">
<activity android:theme="@style/Theme.AppStart" android:windowSoftInputMode="adjustResize"/>
</edit-config>
<source-file src="src/android/SplashScreen.java" target-dir="src/org/apache/cordova/splashscreen" /> <source-file src="src/android/SplashScreen.java" target-dir="src/org/apache/cordova/splashscreen" />
</platform> <resource-file src="src/android/res/values/style.xml"
target="res/values/style.xml" />
<!-- amazon-fireos -->
<platform name="amazon-fireos">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="SplashScreen">
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen"/>
</feature>
</config-file>
<source-file src="src/android/SplashScreen.java" target-dir="src/org/apache/cordova/splashscreen" />
</platform>
<!-- ubuntu -->
<platform name="ubuntu">
<header-file src="src/ubuntu/splashscreen.h" />
<source-file src="src/ubuntu/splashscreen.cpp" />
</platform> </platform>
<!-- ios --> <!-- ios -->
@ -82,45 +70,9 @@
<framework src="CoreGraphics.framework" /> <framework src="CoreGraphics.framework" />
</platform> </platform>
<!-- blackberry10 -->
<platform name="blackberry10">
<source-file src="src/blackberry10/index.js" target-dir="SplashScreen" />
<config-file target="www/config.xml" parent="/widget">
<feature name="SplashScreen" value="SplashScreen"/>
</config-file>
</platform>
<!-- wp8 -->
<platform name="wp8">
<config-file target="config.xml" parent="/*">
<feature name="SplashScreen">
<param name="wp-package" value="SplashScreen"/>
<param name="onload" value="true"/>
</feature>
</config-file>
<source-file src="src/wp/SplashScreen.cs" />
<source-file src="src/wp/ResolutionHelper.cs" />
</platform>
<!-- windows8 -->
<platform name="windows8">
<js-module src="www/windows/SplashScreenProxy.js" name="SplashScreenProxy">
<merges target="" />
</js-module>
</platform>
<!-- windows --> <!-- windows -->
<platform name="windows"> <platform name="windows">
<js-module src="www/windows/SplashScreenProxy.js" name="SplashScreenProxy"> <js-module src="www/windows/SplashScreenProxy.js" name="SplashScreenProxy">
<merges target="" />
</js-module>
</platform>
<!-- tizen -->
<platform name="tizen">
<js-module src="src/tizen/SplashScreenProxy.js" name="SplashScreenProxy">
<runs /> <runs />
</js-module> </js-module>
</platform> </platform>

View File

@ -24,8 +24,10 @@ import android.app.ProgressDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.ColorStateList;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.view.Display; import android.view.Display;
import android.view.Gravity; import android.view.Gravity;
@ -52,6 +54,7 @@ public class SplashScreen extends CordovaPlugin {
// Enable functionality only if running on 4.x.x. // Enable functionality only if running on 4.x.x.
private static final boolean HAS_BUILT_IN_SPLASH_SCREEN = Integer.valueOf(CordovaWebView.CORDOVA_VERSION.split("\\.")[0]) < 4; private static final boolean HAS_BUILT_IN_SPLASH_SCREEN = Integer.valueOf(CordovaWebView.CORDOVA_VERSION.split("\\.")[0]) < 4;
private static final int DEFAULT_SPLASHSCREEN_DURATION = 3000; private static final int DEFAULT_SPLASHSCREEN_DURATION = 3000;
private static final int DEFAULT_FADE_DURATION = 500;
private static Dialog splashDialog; private static Dialog splashDialog;
private static ProgressDialog spinnerDialog; private static ProgressDialog spinnerDialog;
private static boolean firstShow = true; private static boolean firstShow = true;
@ -76,24 +79,32 @@ public class SplashScreen extends CordovaPlugin {
} }
} }
private int getSplashId() {
int drawableId = 0;
String splashResource = preferences.getString("SplashScreen", "screen");
if (splashResource != null) {
drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getClass().getPackage().getName());
if (drawableId == 0) {
drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getPackageName());
}
}
return drawableId;
}
@Override @Override
protected void pluginInitialize() { protected void pluginInitialize() {
if (HAS_BUILT_IN_SPLASH_SCREEN) { if (HAS_BUILT_IN_SPLASH_SCREEN) {
return; return;
} }
// Make WebView invisible while loading URL // Make WebView invisible while loading URL
getView().setVisibility(View.INVISIBLE); // CB-11326 Ensure we're calling this on UI thread
int drawableId = preferences.getInteger("SplashDrawableId", 0); cordova.getActivity().runOnUiThread(new Runnable() {
if (drawableId == 0) { @Override
String splashResource = preferences.getString("SplashScreen", "screen"); public void run() {
if (splashResource != null) { getView().setVisibility(View.INVISIBLE);
drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getClass().getPackage().getName());
if (drawableId == 0) {
drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getPackageName());
}
preferences.set("SplashDrawableId", drawableId);
} }
} });
int drawableId = getSplashId();
// Save initial orientation. // Save initial orientation.
orientation = cordova.getActivity().getResources().getConfiguration().orientation; orientation = cordova.getActivity().getResources().getConfiguration().orientation;
@ -117,7 +128,7 @@ public class SplashScreen extends CordovaPlugin {
private int getFadeDuration () { private int getFadeDuration () {
int fadeSplashScreenDuration = preferences.getBoolean("FadeSplashScreen", true) ? int fadeSplashScreenDuration = preferences.getBoolean("FadeSplashScreen", true) ?
preferences.getInteger("FadeSplashScreenDuration", DEFAULT_SPLASHSCREEN_DURATION) : 0; preferences.getInteger("FadeSplashScreenDuration", DEFAULT_FADE_DURATION) : 0;
if (fadeSplashScreenDuration < 30) { if (fadeSplashScreenDuration < 30) {
// [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10 // [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10
@ -198,7 +209,7 @@ public class SplashScreen extends CordovaPlugin {
// Splash drawable may change with orientation, so reload it. // Splash drawable may change with orientation, so reload it.
if (splashImageView != null) { if (splashImageView != null) {
int drawableId = preferences.getInteger("SplashDrawableId", 0); int drawableId = getSplashId();
if (drawableId != 0) { if (drawableId != 0) {
splashImageView.setImageDrawable(cordova.getActivity().getResources().getDrawable(drawableId)); splashImageView.setImageDrawable(cordova.getActivity().getResources().getDrawable(drawableId));
} }
@ -209,7 +220,10 @@ public class SplashScreen extends CordovaPlugin {
private void removeSplashScreen(final boolean forceHideImmediately) { private void removeSplashScreen(final boolean forceHideImmediately) {
cordova.getActivity().runOnUiThread(new Runnable() { cordova.getActivity().runOnUiThread(new Runnable() {
public void run() { public void run() {
if (splashDialog != null && splashDialog.isShowing()) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cordova.getActivity().getWindow().setNavigationBarColor(Color.parseColor("#000000"));
}
if (splashDialog != null && splashImageView != null && splashDialog.isShowing()) {//check for non-null splashImageView, see https://issues.apache.org/jira/browse/CB-12277
final int fadeSplashScreenDuration = getFadeDuration(); final int fadeSplashScreenDuration = getFadeDuration();
// CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately // CB-10692 If the plugin is being paused/destroyed, skip the fading and hide it immediately
if (fadeSplashScreenDuration > 0 && forceHideImmediately == false) { if (fadeSplashScreenDuration > 0 && forceHideImmediately == false) {
@ -228,7 +242,7 @@ public class SplashScreen extends CordovaPlugin {
@Override @Override
public void onAnimationEnd(Animation animation) { public void onAnimationEnd(Animation animation) {
if (splashDialog != null && splashDialog.isShowing()) { if (splashDialog != null && splashImageView != null && splashDialog.isShowing()) {//check for non-null splashImageView, see https://issues.apache.org/jira/browse/CB-12277
splashDialog.dismiss(); splashDialog.dismiss();
splashDialog = null; splashDialog = null;
splashImageView = null; splashImageView = null;
@ -256,13 +270,17 @@ public class SplashScreen extends CordovaPlugin {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private void showSplashScreen(final boolean hideAfterDelay) { private void showSplashScreen(final boolean hideAfterDelay) {
final int splashscreenTime = preferences.getInteger("SplashScreenDelay", DEFAULT_SPLASHSCREEN_DURATION); final int splashscreenTime = preferences.getInteger("SplashScreenDelay", DEFAULT_SPLASHSCREEN_DURATION);
final int drawableId = preferences.getInteger("SplashDrawableId", 0); final int drawableId = getSplashId();
final int fadeSplashScreenDuration = getFadeDuration(); final int fadeSplashScreenDuration = getFadeDuration();
final int effectiveSplashDuration = Math.max(0, splashscreenTime - fadeSplashScreenDuration); final int effectiveSplashDuration = Math.max(0, splashscreenTime - fadeSplashScreenDuration);
lastHideAfterDelay = hideAfterDelay; lastHideAfterDelay = hideAfterDelay;
// Prevent to show the splash dialog if the activity is in the process of finishing
if (cordova.getActivity().isFinishing()) {
return;
}
// If the splash dialog is showing don't try to show it again // If the splash dialog is showing don't try to show it again
if (splashDialog != null && splashDialog.isShowing()) { if (splashDialog != null && splashDialog.isShowing()) {
return; return;
@ -301,8 +319,9 @@ public class SplashScreen extends CordovaPlugin {
// Create and show the dialog // Create and show the dialog
splashDialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar); splashDialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar);
// check to see if the splash screen should be full screen // check to see if the splash screen should be full screen
if ((cordova.getActivity().getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) boolean fullscreen = preferences.getBoolean("SplashFullScreen", true);
== WindowManager.LayoutParams.FLAG_FULLSCREEN) { if (fullscreen || ((cordova.getActivity().getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN)
== WindowManager.LayoutParams.FLAG_FULLSCREEN)) {
splashDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, splashDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN); WindowManager.LayoutParams.FLAG_FULLSCREEN);
} }
@ -354,6 +373,27 @@ public class SplashScreen extends CordovaPlugin {
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE); layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
progressBar.setLayoutParams(layoutParams); progressBar.setLayoutParams(layoutParams);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
String colorName = preferences.getString("SplashScreenSpinnerColor", null);
if(colorName != null){
int[][] states = new int[][] {
new int[] { android.R.attr.state_enabled}, // enabled
new int[] {-android.R.attr.state_enabled}, // disabled
new int[] {-android.R.attr.state_checked}, // unchecked
new int[] { android.R.attr.state_pressed} // pressed
};
int progressBarColor = Color.parseColor(colorName);
int[] colors = new int[] {
progressBarColor,
progressBarColor,
progressBarColor,
progressBarColor
};
ColorStateList colorStateList = new ColorStateList(states, colors);
progressBar.setIndeterminateTintList(colorStateList);
}
}
centeredLayout.addView(progressBar); centeredLayout.addView(progressBar);
spinnerDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); spinnerDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.AppStart" parent="android:Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@drawable/screen</item>
</style>
</resources>

View File

@ -1,30 +0,0 @@
/*
* Copyright 2013 Research In Motion Limited.
*
* 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.
*/
/* global PluginResult */
module.exports = {
show: function (success, fail, args, env) {
var result = new PluginResult(args, env);
result.error("Not supported on platform", false);
},
hide: function (success, fail, args, env) {
var result = new PluginResult(args, env);
window.qnx.webplatform.getApplication().windowVisible = true;
result.ok(undefined, false);
}
};

View File

@ -31,6 +31,7 @@ var splashScreenDelay = 3000; // in milliseconds
var showSplashScreen = true; // show splashcreen by default var showSplashScreen = true; // show splashcreen by default
var cordova = require('cordova'); var cordova = require('cordova');
var configHelper = cordova.require('cordova/confighelper'); var configHelper = cordova.require('cordova/confighelper');
var autoHideSplashScreen = true;
function updateImageLocation() { function updateImageLocation() {
position.width = Math.min(splashImageWidth, window.innerWidth); position.width = Math.min(splashImageWidth, window.innerWidth);
@ -66,6 +67,7 @@ var SplashScreen = {
localSplash = document.createElement("div"); localSplash = document.createElement("div");
localSplash.style.backgroundColor = bgColor; localSplash.style.backgroundColor = bgColor;
localSplash.style.position = "absolute"; localSplash.style.position = "absolute";
localSplash.style["z-index"] = "99999";
localSplashImage = document.createElement("img"); localSplashImage = document.createElement("img");
localSplashImage.src = imageSrc; localSplashImage.src = imageSrc;
@ -75,13 +77,34 @@ var SplashScreen = {
localSplash.appendChild(localSplashImage); localSplash.appendChild(localSplashImage);
document.body.appendChild(localSplash); document.body.appendChild(localSplash);
// deviceready fires earlier than the plugin init on cold-start
if (SplashScreen.shouldHideImmediately) {
SplashScreen.shouldHideImmediately = false;
window.setTimeout(function () {
SplashScreen.hide();
}, 1000);
}
} }
}, },
hide: function () { hide: function () {
if(localSplash) { if(localSplash) {
window.removeEventListener("resize", onResize, false); var innerLocalSplash = localSplash;
document.body.removeChild(localSplash);
localSplash = null; localSplash = null;
window.removeEventListener("resize", onResize, false);
innerLocalSplash.style.opacity = '0';
innerLocalSplash.style["-webkit-transition"] = "opacity 1s ease-in-out";
innerLocalSplash.style["-moz-transition"] = "opacity 1s ease-in-out";
innerLocalSplash.style["-ms-transition"] = "opacity 1s ease-in-out";
innerLocalSplash.style["-o-transition"] = "opacity 1s ease-in-out";
window.setTimeout(function () {
document.body.removeChild(innerLocalSplash);
innerLocalSplash = null;
}, 1000);
} else {
SplashScreen.shouldHideImmediately = true;
} }
} }
}; };
@ -97,12 +120,16 @@ function readPreferencesFromCfg(cfg) {
} }
splashScreenDelay = cfg.getPreferenceValue('SplashScreenDelay') || splashScreenDelay; splashScreenDelay = cfg.getPreferenceValue('SplashScreenDelay') || splashScreenDelay;
splashScreenDelay = parseInt(splashScreenDelay, 10);
imageSrc = cfg.getPreferenceValue('SplashScreen') || imageSrc; imageSrc = cfg.getPreferenceValue('SplashScreen') || imageSrc;
bgColor = cfg.getPreferenceValue('SplashScreenBackgroundColor') || bgColor; bgColor = cfg.getPreferenceValue('SplashScreenBackgroundColor') || bgColor;
splashImageWidth = cfg.getPreferenceValue('SplashScreenWidth') || splashImageWidth; splashImageWidth = cfg.getPreferenceValue('SplashScreenWidth') || splashImageWidth;
splashImageHeight = cfg.getPreferenceValue('SplashScreenHeight') || splashImageHeight; splashImageHeight = cfg.getPreferenceValue('SplashScreenHeight') || splashImageHeight;
autoHideSplashScreen = cfg.getPreferenceValue('AutoHideSplashScreen') || autoHideSplashScreen;
autoHideSplashScreen = (autoHideSplashScreen === true || autoHideSplashScreen.toLowerCase() === 'true');
} catch(e) { } catch(e) {
var msg = '[Browser][SplashScreen] Error occured on loading preferences from config.xml: ' + JSON.stringify(e); var msg = '[Browser][SplashScreen] Error occurred on loading preferences from config.xml: ' + JSON.stringify(e);
console.error(msg); console.error(msg);
} }
} }
@ -121,12 +148,17 @@ function showAndHide() {
} }
/** /**
* Tries to read config.xml and override default properties and then shows and hides splashcreen if it is enabled. * Tries to read config.xml and override default properties and then shows and hides splashscreen if it is enabled.
*/ */
(function initAndShow() { (function initAndShow() {
configHelper.readConfig(function(config) { configHelper.readConfig(function(config) {
readPreferencesFromCfg(config); readPreferencesFromCfg(config);
showAndHide(); if (autoHideSplashScreen) {
showAndHide();
} else {
SplashScreen.show();
}
}, function(err) { }, function(err) {
console.error(err); console.error(err);
}); });

View File

@ -28,6 +28,7 @@ typedef struct {
BOOL iPhone6; BOOL iPhone6;
BOOL iPhone6Plus; BOOL iPhone6Plus;
BOOL retina; BOOL retina;
BOOL iPhoneX;
} CDV_iOSDevice; } CDV_iOSDevice;

View File

@ -23,6 +23,7 @@
#import "CDVViewController+SplashScreen.h" #import "CDVViewController+SplashScreen.h"
#define kSplashScreenDurationDefault 3000.0f #define kSplashScreenDurationDefault 3000.0f
#define kFadeDurationDefault 500.0f
@implementation CDVSplashScreen @implementation CDVSplashScreen
@ -73,7 +74,7 @@
// Determine whether rotation should be enabled for this device // Determine whether rotation should be enabled for this device
// Per iOS HIG, landscape is only supported on iPad and iPhone 6+ // Per iOS HIG, landscape is only supported on iPad and iPhone 6+
CDV_iOSDevice device = [self getCurrentDevice]; CDV_iOSDevice device = [self getCurrentDevice];
BOOL autorotateValue = (device.iPad || device.iPhone6Plus) ? BOOL autorotateValue = (device.iPad || device.iPhone6Plus || device.iPhoneX) ?
[(CDVViewController *)self.viewController shouldAutorotateDefaultValue] : [(CDVViewController *)self.viewController shouldAutorotateDefaultValue] :
NO; NO;
@ -141,8 +142,16 @@
_curImageName = nil; _curImageName = nil;
self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion
[self.viewController.view removeObserver:self forKeyPath:@"frame"]; @try {
[self.viewController.view removeObserver:self forKeyPath:@"bounds"]; [self.viewController.view removeObserver:self forKeyPath:@"frame"];
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
}
@catch (NSException *exception) {
// When reloading the page from a remotely connected Safari, there
// are no observers, so the removeObserver method throws an exception,
// that we can safely ignore.
// Alternatively we can check whether there are observers before calling removeObserver
}
} }
- (CDV_iOSDevice) getCurrentDevice - (CDV_iOSDevice) getCurrentDevice
@ -165,15 +174,31 @@
// this is appropriate for detecting the runtime screen environment // this is appropriate for detecting the runtime screen environment
device.iPhone6 = (device.iPhone && limit == 667.0); device.iPhone6 = (device.iPhone && limit == 667.0);
device.iPhone6Plus = (device.iPhone && limit == 736.0); device.iPhone6Plus = (device.iPhone && limit == 736.0);
device.iPhoneX = (device.iPhone && limit == 812.0);
return device; return device;
} }
- (BOOL) isUsingCDVLaunchScreen {
NSString* launchStoryboardName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
if (launchStoryboardName) {
return ([launchStoryboardName isEqualToString:@"CDVLaunchScreen"]);
} else {
return NO;
}
}
- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device - (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device
{ {
// Use UILaunchImageFile if specified in plist. Otherwise, use Default. // Use UILaunchImageFile if specified in plist. Otherwise, use Default.
NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
// detect if we are using CB-9762 Launch Storyboard; if so, return the associated image instead
if ([self isUsingCDVLaunchScreen]) {
imageName = @"LaunchStoryboard";
return imageName;
}
NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations];
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
@ -198,8 +223,12 @@
imageName = [imageName stringByAppendingString:@"-700"]; imageName = [imageName stringByAppendingString:@"-700"];
} else if(device.iPhone6) { } else if(device.iPhone6) {
imageName = [imageName stringByAppendingString:@"-800"]; imageName = [imageName stringByAppendingString:@"-800"];
} else if(device.iPhone6Plus) { } else if(device.iPhone6Plus || device.iPhoneX ) {
imageName = [imageName stringByAppendingString:@"-800"]; if(device.iPhone6Plus) {
imageName = [imageName stringByAppendingString:@"-800"];
} else {
imageName = [imageName stringByAppendingString:@"-1100"];
}
if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown) if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown)
{ {
imageName = [imageName stringByAppendingString:@"-Portrait"]; imageName = [imageName stringByAppendingString:@"-Portrait"];
@ -215,7 +244,7 @@
{ // does not support landscape { // does not support landscape
imageName = [imageName stringByAppendingString:@"-667h"]; imageName = [imageName stringByAppendingString:@"-667h"];
} }
else if (device.iPhone6Plus) else if (device.iPhone6Plus || device.iPhoneX)
{ // supports landscape { // supports landscape
if (isOrientationLocked) if (isOrientationLocked)
{ {
@ -233,8 +262,11 @@
break; break;
} }
} }
imageName = [imageName stringByAppendingString:@"-736h"]; if (device.iPhoneX) {
imageName = [imageName stringByAppendingString:@"-2436h"];
} else {
imageName = [imageName stringByAppendingString:@"-736h"];
}
} }
else if (device.iPad) else if (device.iPad)
{ // supports landscape { // supports landscape
@ -325,6 +357,14 @@
- (void)updateBounds - (void)updateBounds
{ {
if ([self isUsingCDVLaunchScreen]) {
// CB-9762's launch screen expects the image to fill the screen and be scaled using AspectFill.
CGSize viewportSize = [UIApplication sharedApplication].delegate.window.bounds.size;
_imageView.frame = CGRectMake(0, 0, viewportSize.width, viewportSize.height);
_imageView.contentMode = UIViewContentModeScaleAspectFill;
return;
}
UIImage* img = _imageView.image; UIImage* img = _imageView.image;
CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero; CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero;
@ -338,7 +378,7 @@
* correctly. * correctly.
*/ */
CDV_iOSDevice device = [self getCurrentDevice]; CDV_iOSDevice device = [self getCurrentDevice];
if (UIInterfaceOrientationIsLandscape(orientation) && !device.iPhone6Plus && !device.iPad) if (UIInterfaceOrientationIsLandscape(orientation) && !device.iPhone6Plus && !device.iPad && !device.iPhoneX)
{ {
imgTransform = CGAffineTransformMakeRotation(M_PI / 2); imgTransform = CGAffineTransformMakeRotation(M_PI / 2);
imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width); imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width);
@ -390,7 +430,7 @@
id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]]; id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]];
id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]]; id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]];
float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault : [fadeSplashScreenDuration floatValue]; float fadeDuration = fadeSplashScreenDuration == nil ? kFadeDurationDefault : [fadeSplashScreenDuration floatValue];
id splashDurationString = [self.commandDelegate.settings objectForKey: [@"SplashScreenDelay" lowercaseString]]; id splashDurationString = [self.commandDelegate.settings objectForKey: [@"SplashScreenDelay" lowercaseString]];
float splashDuration = splashDurationString == nil ? kSplashScreenDurationDefault : [splashDurationString floatValue]; float splashDuration = splashDurationString == nil ? kSplashScreenDurationDefault : [splashDurationString floatValue];

View File

@ -1,43 +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.
*
*/
( function() {
var win = null;
module.exports = {
show: function() {
if ( win === null ) {
win = window.open('splashscreen.html');
}
},
hide: function() {
if ( win !== null ) {
win.close();
win = null;
}
}
};
require("cordova/tizen/commandProxy").add("SplashScreen", module.exports);
})();

View File

@ -1,42 +0,0 @@
/*
*
* Copyright 2013 Canonical Ltd.
*
* 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.
*
*/
#include <QQuickItem>
#include "splashscreen.h"
#include <cordova.h>
#define SPLASHSCREEN_STATE_NAME "splashscreen"
Splashscreen::Splashscreen(Cordova *cordova): CPlugin(cordova) {
}
void Splashscreen::show(int, int) {
m_cordova->rootObject()->setProperty("splashscreenPath", m_cordova->getSplashscreenPath());
m_cordova->pushViewState(SPLASHSCREEN_STATE_NAME);
}
void Splashscreen::hide(int, int) {
m_cordova->popViewState(SPLASHSCREEN_STATE_NAME);
}

View File

@ -1,52 +0,0 @@
/*
*
* Copyright 2013 Canonical Ltd.
*
* 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.
*
*/
#ifndef SPLASHSCREEN_H
#define SPLASHSCREEN_H
#include <QtCore>
#include <cplugin.h>
class Splashscreen: public CPlugin {
Q_OBJECT
public:
explicit Splashscreen(Cordova *cordova);
virtual const QString fullName() override {
return Splashscreen::fullID();
}
virtual const QString shortName() override {
return "SplashScreen";
}
static const QString fullID() {
return "SplashScreen";
}
public slots:
void show(int, int);
void hide(int, int);
};
#endif // SPLASHSCREEN_H

View File

@ -1,39 +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.
-->
# iOS-Tests für CDVSplashScreen
Sie müssen installieren `node.js` in `Cordova-Ios` zu ziehen.
Installieren Sie Cordova-Ios zum ersten Mal:
npm install
... im aktuellen Ordner.
# Testen von Xcode
1. Starten Sie die Datei `CDVSplashScreenTest.xcworkspace` .
2. Wählen Sie im Dropdown-Schema "CDVSplashScreenLibTests"
3. Klicken Sie und halten Sie auf den `Play` -Button und wählen Sie das `Schraubenschlüssel` -Symbol zum Ausführen der tests
# Tests von der Befehlszeile aus
npm test

View File

@ -1,39 +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.
-->
# Pruebas de iOS para CDVSplashScreen
Necesita instalar `node.js` en `Córdoba-ios`.
Primero instalar cordova-ios:
npm install
... en la carpeta actual.
# Prueba de Xcode
1. Iniciar el archivo `CDVSplashScreenTest.xcworkspace` .
2. Elija "CDVSplashScreenLibTests" en el menú de lista desplegable esquema
3. Haga clic y mantenga el botón de `Play` y elegir el icono de `llave inglesa` para ejecutar las pruebas
# Pruebas desde la línea de comandos
npm test

View File

@ -1,39 +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.
-->
# Tests d'iOS pour CDVSplashScreen
Vous devez installer `node.js` à `cordova-ios`.
Commencez par installer cordova-ios :
npm install
... dans le dossier actuel.
# Tests de Xcode
1. Lancez le fichier `CDVSplashScreenTest.xcworkspace` .
2. Choisissez « CDVSplashScreenLibTests » dans le menu déroulant de régime
3. Cliquez et maintenez sur la touche `Play` et cliquez sur l'icône de `clé` pour exécuter les tests
# Test de la ligne de commande
npm test

View File

@ -1,39 +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.
-->
# Test di iOS per CDVSplashScreen
È necessario installare `node. js` per tirare in `cordova-ios`.
In primo luogo installare cordova-ios:
npm install
... nella cartella corrente.
# Test da Xcode
1. Lanciare il file `CDVSplashScreenTest.xcworkspace` .
2. Scegli "CDVSplashScreenLibTests" dal menu a discesa Schema
3. Fare clic e tenere premuto il pulsante `Play` e scegliere l'icona della `chiave inglese` per eseguire i test
# Test dalla riga di comando
npm test

View File

@ -1,39 +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.
-->
# CDVSplashScreen の iOS のテスト
`Node.js` `コルドバ`ios をプルするをインストールする必要があります。.
コルドバ ios をインストールします。
npm install
現在のフォルダーに.
# Xcode からテスト
1. `CDVSplashScreenTest.xcworkspace`ファイルを起動します。
2. スキーム] ドロップダウン メニューから"CDVSplashScreenLibTests"を選択します。
3. クリックし、`再生`ボタンを押し、テストを実行する`レンチ`のアイコンを選択
# コマンドラインからテスト
npm test

View File

@ -1,39 +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.
-->
# CDVSplashScreen에 대 한 iOS 테스트
`Node.js` `코르도바` ios에서를 설치 해야.
코르도바-ios를 설치 하는 첫번째는:
npm install
현재 폴더에....
# Xcode에서 테스트
1. `CDVSplashScreenTest.xcworkspace` 파일을 시작 합니다.
2. 구성표 드롭 다운 메뉴에서 "CDVSplashScreenLibTests"를 선택
3. 클릭 하 고 `재생` 버튼에는 테스트를 실행 하려면 `공구 모양` 아이콘을 선택
# 명령줄에서 테스트
npm test

View File

@ -1,39 +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.
-->
# iOS testy dla CDVSplashScreen
Musisz zainstalować `node.js` ciągnąć w `cordova-ios`.
Najpierw zainstalować cordova-ios:
npm install
... w folderze bieżącym.
# Badania z Xcode
1. Uruchom plik `CDVSplashScreenTest.xcworkspace` .
2. Wybierz z menu rozwijanego systemu "CDVSplashScreenLibTests"
3. Kliknij i przytrzymaj przycisk `Play` i wybrać ikonę `klucz` do testów
# Badania z wiersza polecenia
npm test

View File

@ -1,39 +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.
-->
# CDVSplashScreen 的 iOS 測試
您需要安裝`node.js``科爾多瓦 ios`中.
第一次安裝科爾多瓦 ios:
npm install
在當前資料夾中。
# 從 Xcode 測試
1. 啟動`CDVSplashScreenTest.xcworkspace`檔。
2. 從方案下拉式功能表中選擇"CDVSplashScreenLibTests"
3. 按一下並堅持`播放`按鈕,然後選擇要運行的測試的`扳手`圖示
# 從命令列測試
npm test

14
tests/package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "cordova-plugin-splashscreen-tests",
"version": "5.0.4-dev",
"description": "",
"cordova": {
"id": "cordova-plugin-splashscreen-tests",
"platforms": []
},
"keywords": [
"ecosystem:cordova"
],
"author": "",
"license": "Apache 2.0"
}

View File

@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-splashscreen-tests" id="cordova-plugin-splashscreen-tests"
version="3.2.2"> version="5.0.4-dev">
<name>Cordova Splashscreen Plugin Tests</name> <name>Cordova Splashscreen Plugin Tests</name>
<license>Apache 2.0</license> <license>Apache 2.0</license>

17
types/index.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
// Type definitions for Apache Cordova Splashscreen plugin
// Project: https://github.com/apache/cordova-plugin-splashscreen
// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
//
// Copyright (c) Microsoft Open Technologies Inc
// Licensed under the MIT license.
interface Navigator {
/** This plugin displays and hides a splash screen during application launch. */
splashscreen: {
/** Dismiss the splash screen. */
hide(): void;
/** Displays the splash screen. */
show(): void;
}
}

View File

@ -20,56 +20,15 @@
*/ */
/*jslint sloppy:true */ /*jslint sloppy:true */
/*global WinJS */
var cordova = require('cordova'); var splash = require('cordova/splashscreen');
var isPhone = (cordova.platformId == "windows") && WinJS.Utilities.isPhone;
var isHosted = window.location.protocol.indexOf('http') === 0;
var localSplash = null, localSplashImage = null;
var bgColor = "#464646"; // default backgrond color; TDOO - read it from .appxmanifest
var splashImageSrc = (isHosted ? "ms-appx-web" : "ms-appx") + ":///images/" +
(isPhone ? "splashscreenphone.png" : "splashscreen.png");
var SplashScreen = { var SplashScreen = {
setBGColor: function (cssBGColor) {
bgColor = cssBGColor;
if (localSplash) {
localSplash.style.backgroundColor = bgColor;
}
},
show: function () { show: function () {
if (localSplash) { splash.show();
return; // already showed
}
localSplash = document.createElement("div");
localSplash.style.backgroundColor = bgColor;
localSplash.style.position = "fixed";
localSplash.style.top = "0";
localSplash.style.width = "100%";
localSplash.style.height = "100%";
localSplashImage = document.createElement("img");
localSplashImage.src = splashImageSrc;
localSplashImage.style.maxWidth = "100%";
localSplashImage.style.maxHeight = "100%";
// center horizontally
localSplashImage.style.margin = "0 auto";
localSplashImage.style.display = "block";
// center vertically
localSplashImage.style.position = "relative";
localSplashImage.style.top = "50%";
localSplashImage.style.transform = "translateY(-50%)";
localSplash.appendChild(localSplashImage);
document.body.appendChild(localSplash);
}, },
hide: function () { hide: function () {
if (localSplash) { splash.hide();
document.body.removeChild(localSplash);
localSplash = null;
}
} }
}; };