mirror of
https://github.com/apache/cordova-plugin-splashscreen.git
synced 2026-04-14 00:01:34 +08:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b58cd69b3 | |||
| 5d25cf0250 | |||
| cd61952efc | |||
| 6f23d8e828 | |||
| cf5c5beafb | |||
| 1f50d90d9e | |||
| c56bb9efec | |||
| 1943a88c8c | |||
| ac1422f49f | |||
| b3b7a561ab | |||
| 91ed62deda | |||
| 30661dbb42 | |||
| b109c7f234 | |||
| d7f0994f32 | |||
| f37c1557b6 | |||
| 988517df7f | |||
| 8e12d550a1 | |||
| 829dbcc819 | |||
| ae7daf48e3 | |||
| 4fda49b771 | |||
| 2c68427a8a | |||
| 0498d90517 | |||
| 5c245c2bc8 | |||
| ec5bbc51e7 | |||
| 1c350a061f | |||
| 7d78efed0d | |||
| 51e054a1ea | |||
| 39827ec753 | |||
| 71dc86786b | |||
| 0a82a8ef2d | |||
| 83a6c41132 | |||
| 0838b1d3a7 | |||
| bcbb574d05 | |||
| f82ff290a9 | |||
| fca4e5c351 | |||
| 0595d4d779 | |||
| 3d553eb51a | |||
| 6cb0a8cf0c | |||
| 4da6ca883c |
@@ -0,0 +1,37 @@
|
|||||||
|
<!--
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Contributing to Apache Cordova
|
||||||
|
|
||||||
|
Anyone can contribute to Cordova. And we need your contributions.
|
||||||
|
|
||||||
|
There are multiple ways to contribute: report bugs, improve the docs, and
|
||||||
|
contribute code.
|
||||||
|
|
||||||
|
For instructions on this, start with the
|
||||||
|
[contribution overview](http://cordova.apache.org/#contribute).
|
||||||
|
|
||||||
|
The details are explained there, but the important items are:
|
||||||
|
- Sign and submit an Apache ICLA (Contributor License Agreement).
|
||||||
|
- Have a Jira issue open that corresponds to your contribution.
|
||||||
|
- Run the tests so your patch doesn't break existing functionality.
|
||||||
|
|
||||||
|
We look forward to your contributions!
|
||||||
@@ -57,3 +57,23 @@
|
|||||||
* CB-6460: Update license headers
|
* CB-6460: Update license headers
|
||||||
* CB-6465: Add license headers to Tizen code
|
* CB-6465: Add license headers to Tizen code
|
||||||
* Add NOTICE file
|
* Add NOTICE file
|
||||||
|
|
||||||
|
### 0.3.1 (Jun 05, 2014)
|
||||||
|
* documentation translation: cordova-plugin-splashscreen
|
||||||
|
* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
|
||||||
|
* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
|
||||||
|
* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
|
||||||
|
* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
|
||||||
|
* CB-6810 Add license to CONTRIBUTING.md
|
||||||
|
* [wp8] updated quirk for and combined iOS,WP8,BB10 quirks as they are all the same
|
||||||
|
* [wp] implemented OnInit so splash screen can be shown before cordova page is loaded
|
||||||
|
* [wp] plugin must be autoloaded for AutoHideSplashScreen preference to work
|
||||||
|
* CB-6483 Use splash screen image from manifest on Windows8
|
||||||
|
* CB-6491 add CONTRIBUTING.md
|
||||||
|
* Revert "Merge branch 'tizen' of http://github.com/siovene/cordova-plugin-splashscreen"
|
||||||
|
|
||||||
|
### 0.3.2 (Aug 06, 2014)
|
||||||
|
* CB-6127 Updated translations for docs
|
||||||
|
* CB-7041 ios: Fix image filename logic when setting the iPad splash screen
|
||||||
|
* fixes Splashscreen crash on WP8
|
||||||
|
* Remove outdated doc
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
|
||||||
|
## Unterstützte Plattformen
|
||||||
|
|
||||||
|
* Amazon Fire OS
|
||||||
|
* Android
|
||||||
|
* BlackBerry 10
|
||||||
|
* iOS
|
||||||
|
* Windows Phone 7 und 8
|
||||||
|
* Windows 8
|
||||||
|
|
||||||
|
## Methoden
|
||||||
|
|
||||||
|
* SplashScreen.Show
|
||||||
|
* SplashScreen.Hide
|
||||||
|
|
||||||
|
### Android Macken
|
||||||
|
|
||||||
|
Sie müssen in der Datei config.xml fügen Sie die folgenden Einstellungen:
|
||||||
|
|
||||||
|
`<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 Quirk
|
||||||
|
|
||||||
|
Die `config.xml` der Datei `AutoHideSplashScreen` muss `false` . 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 aufgerufen werden `navigator.splashscreen.show()` bis die app gestartet 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 `config.xml` wird automatisch `show` den Splash-Screen unmittelbar nach Ihrer app starten und bevor es voll gestartet und hat das `deviceready` Ereignis. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1] . Aus diesem Grund ist es unwahrscheinlich, dass Sie aufrufen müssen `navigator.splashscreen.show()` den Splash-Screen beim Starten der app sichtbar zu machen.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación.
|
||||||
|
|
||||||
|
## Instalación
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
|
||||||
|
## Plataformas soportadas
|
||||||
|
|
||||||
|
* Amazon fuego 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:
|
||||||
|
|
||||||
|
`<preference name="SplashScreen" value="foo" />` `<preference name="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.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.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
|
||||||
|
|
||||||
|
La `config.xml` du fichier `AutoHideSplashScreen` doit être `false` . Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur comme suit dans la `deviceready` gestionnaire d'événements :
|
||||||
|
|
||||||
|
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 le `deviceready` événement a été 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 en `config.xml` sera automatiquement `show` l'écran de démarrage immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu le `deviceready` événement. 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.
|
||||||
+6
-12
@@ -43,15 +43,13 @@ This plugin displays and hides a splash screen during application launch.
|
|||||||
|
|
||||||
### Android Quirks
|
### Android Quirks
|
||||||
|
|
||||||
In your config.xml, you need to add the following preference
|
In your config.xml, you need to add the following preferences:
|
||||||
|
|
||||||
`<preference name="splashscreen" value="foo" />`
|
`<preference name="SplashScreen" value="foo" />`
|
||||||
|
`<preference name="SplashScreenDelay" value="10000" />`
|
||||||
|
|
||||||
Where foo is the name of the splashscreen file. Preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders.
|
Where foo is the name of the splashscreen file, preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders. The second parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)
|
||||||
|
for more information.
|
||||||
For Android, you also have to edit your projects main java file. You must add a second parameter representing a time delay to your super.loadUrl.
|
|
||||||
|
|
||||||
`super.loadUrl(Config.getStartUrl(), 10000);`
|
|
||||||
|
|
||||||
## splashscreen.hide
|
## splashscreen.hide
|
||||||
|
|
||||||
@@ -60,11 +58,7 @@ Dismiss the splash screen.
|
|||||||
navigator.splashscreen.hide();
|
navigator.splashscreen.hide();
|
||||||
|
|
||||||
|
|
||||||
### BlackBerry 10 Quirk
|
### BlackBerry 10, WP8, iOS Quirk
|
||||||
|
|
||||||
The `config.xml` file's `AutoHideSplashScreen` setting must be `false`.
|
|
||||||
|
|
||||||
### iOS Quirk
|
|
||||||
|
|
||||||
The `config.xml` file's `AutoHideSplashScreen` setting must be
|
The `config.xml` file's `AutoHideSplashScreen` setting must be
|
||||||
`false`. To delay hiding the splash screen for two seconds, add a
|
`false`. To delay hiding the splash screen for two seconds, add a
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione.
|
||||||
|
|
||||||
|
## Installazione
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.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
|
||||||
|
|
||||||
|
Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere `false` . Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel `deviceready` gestore di evento:
|
||||||
|
|
||||||
|
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 ha iniziato l'app e il `deviceready` ha generato l'evento. 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 in `config.xml` verrà automaticamente `show` la schermata iniziale subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto il `deviceready` evento. 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.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
このプラグインが表示され、アプリケーションの起動中にスプラッシュ スクリーンを非表示にします。
|
||||||
|
|
||||||
|
## インストール
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.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();
|
||||||
|
|
||||||
|
|
||||||
|
アプリケーションを呼び出すことはできません `navigator.splashscreen.show()` 、アプリが開始されるまで、 `deviceready` イベントが発生します。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 いくつかの構成を提供する `config.xml` は自動的に `show` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、受信する前に、 `deviceready` イベント。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面][1]を参照してください。 このような理由から、それは可能性を呼び出す必要があります `navigator.splashscreen.show()` アプリ起動時のスプラッシュ画面を見やすくします。
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
이 플러그인은 표시 하 고 응용 프로그램 실행 하는 동안 시작 화면을 숨깁니다.
|
||||||
|
|
||||||
|
## 설치
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.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();
|
||||||
|
|
||||||
|
|
||||||
|
응용 프로그램 호출할 수 없습니다 `navigator.splashscreen.show()` 응용 프로그램은 시작 될 때까지 및 `deviceready` 이벤트를 해 고 했다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. 몇 가지 구성을 제공 `config.xml` 자동으로 `show` 시작 화면 응용 프로그램 실행 후 즉시 및 그것은 완벽 하 게 시작 하 고 받은 전에 `deviceready` 이벤트. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. 이러한 이유로, 그것은 가능성이 호출 해야 `navigator.splashscreen.show()` 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 합니다.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
|
||||||
|
|
||||||
|
## Instalacji
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
|
||||||
|
## Obsługiwane platformy
|
||||||
|
|
||||||
|
* Amazon ogień OS
|
||||||
|
* Android
|
||||||
|
* Jeżyna 10
|
||||||
|
* iOS
|
||||||
|
* Windows Phone 7 i 8
|
||||||
|
* Windows 8
|
||||||
|
|
||||||
|
## Metody
|
||||||
|
|
||||||
|
* splashscreen.show
|
||||||
|
* splashscreen.Hide
|
||||||
|
|
||||||
|
### Android dziwactwa
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
`config.xml`Pliku `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że wywołać `navigator.splashscreen.show()` aż aplikacja została uruchomiona i `deviceready` imprezy 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 `config.xml` będzie automatycznie `show` ekran powitalny, natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i otrzymał `deviceready` zdarzenie. 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.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
Этот плагин отображает и скрывает экран-заставку при запуске приложения.
|
||||||
|
|
||||||
|
## Установка
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
|
||||||
|
## Поддерживаемые платформы
|
||||||
|
|
||||||
|
* Amazon Fire ОС
|
||||||
|
* 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()` для отображения экрана-заставки для запуска приложения.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!---
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# org.apache.cordova.splashscreen
|
||||||
|
|
||||||
|
這個外掛程式顯示和隱藏在應用程式啟動期間的初始螢幕。
|
||||||
|
|
||||||
|
## 安裝
|
||||||
|
|
||||||
|
cordova plugin add org.apache.cordova.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();
|
||||||
|
|
||||||
|
|
||||||
|
### 黑莓 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()` ,使初始螢幕可見的應用程式的啟動。
|
||||||
+3
-1
@@ -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="org.apache.cordova.splashscreen"
|
id="org.apache.cordova.splashscreen"
|
||||||
version="0.3.0">
|
version="0.3.2">
|
||||||
<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>
|
||||||
@@ -89,6 +89,7 @@
|
|||||||
<config-file target="config.xml" parent="/*">
|
<config-file target="config.xml" parent="/*">
|
||||||
<feature name="SplashScreen">
|
<feature name="SplashScreen">
|
||||||
<param name="wp-package" value="SplashScreen"/>
|
<param name="wp-package" value="SplashScreen"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
</feature>
|
</feature>
|
||||||
</config-file>
|
</config-file>
|
||||||
|
|
||||||
@@ -101,6 +102,7 @@
|
|||||||
<config-file target="config.xml" parent="/*">
|
<config-file target="config.xml" parent="/*">
|
||||||
<feature name="SplashScreen">
|
<feature name="SplashScreen">
|
||||||
<param name="wp-package" value="SplashScreen"/>
|
<param name="wp-package" value="SplashScreen"/>
|
||||||
|
<param name="onload" value="true"/>
|
||||||
</feature>
|
</feature>
|
||||||
</config-file>
|
</config-file>
|
||||||
|
|
||||||
|
|||||||
+15
-11
@@ -138,18 +138,22 @@
|
|||||||
|
|
||||||
if (CDV_IsIPhone5()) {
|
if (CDV_IsIPhone5()) {
|
||||||
imageName = [imageName stringByAppendingString:@"-568h"];
|
imageName = [imageName stringByAppendingString:@"-568h"];
|
||||||
} else if (CDV_IsIPad() && isOrientationLocked) {
|
} else if (CDV_IsIPad()) {
|
||||||
switch (orientation) {
|
if (isOrientationLocked) {
|
||||||
case UIInterfaceOrientationLandscapeLeft:
|
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
|
||||||
case UIInterfaceOrientationLandscapeRight:
|
} else {
|
||||||
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
switch (orientation) {
|
||||||
break;
|
case UIInterfaceOrientationLandscapeLeft:
|
||||||
|
case UIInterfaceOrientationLandscapeRight:
|
||||||
|
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
||||||
|
break;
|
||||||
|
|
||||||
case UIInterfaceOrientationPortrait:
|
case UIInterfaceOrientationPortrait:
|
||||||
case UIInterfaceOrientationPortraitUpsideDown:
|
case UIInterfaceOrientationPortraitUpsideDown:
|
||||||
default:
|
default:
|
||||||
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+105
-7
@@ -26,6 +26,11 @@ using Microsoft.Phone.Info;
|
|||||||
using System.Windows.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Resources;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace WPCordovaClassLib.Cordova.Commands
|
namespace WPCordovaClassLib.Cordova.Commands
|
||||||
{
|
{
|
||||||
@@ -36,6 +41,9 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
public class SplashScreen : BaseCommand
|
public class SplashScreen : BaseCommand
|
||||||
{
|
{
|
||||||
private Popup popup;
|
private Popup popup;
|
||||||
|
private bool autohide = true;
|
||||||
|
|
||||||
|
private static bool WasShown = false;
|
||||||
|
|
||||||
public SplashScreen()
|
public SplashScreen()
|
||||||
{
|
{
|
||||||
@@ -45,24 +53,114 @@ namespace WPCordovaClassLib.Cordova.Commands
|
|||||||
SplashScreen.Source = splash_image;
|
SplashScreen.Source = splash_image;
|
||||||
|
|
||||||
// Instansiate the popup and set the Child property of Popup to SplashScreen
|
// Instansiate the popup and set the Child property of Popup to SplashScreen
|
||||||
this.popup = new Popup() {IsOpen = false, Child = SplashScreen };
|
popup = new Popup() {IsOpen = false, Child = SplashScreen };
|
||||||
// Orient the popup accordingly
|
// Orient the popup accordingly
|
||||||
this.popup.HorizontalAlignment = HorizontalAlignment.Stretch;
|
popup.HorizontalAlignment = HorizontalAlignment.Stretch;
|
||||||
this.popup.VerticalAlignment = VerticalAlignment.Center;
|
popup.VerticalAlignment = VerticalAlignment.Center;
|
||||||
|
|
||||||
|
|
||||||
|
LoadConfigValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show(string options)
|
public override void OnInit()
|
||||||
|
{
|
||||||
|
// we only want to autoload the first time a page is loaded.
|
||||||
|
if (!WasShown)
|
||||||
|
{
|
||||||
|
WasShown = true;
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LoadConfigValues()
|
||||||
|
{
|
||||||
|
StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("config.xml", UriKind.Relative));
|
||||||
|
|
||||||
|
if (streamInfo != null)
|
||||||
|
{
|
||||||
|
StreamReader sr = new StreamReader(streamInfo.Stream);
|
||||||
|
//This will Read Keys Collection for the xml file
|
||||||
|
XDocument document = XDocument.Parse(sr.ReadToEnd());
|
||||||
|
|
||||||
|
var preferences = from results in document.Descendants()
|
||||||
|
where (string)results.Attribute("name") == "AutoHideSplashScreen"
|
||||||
|
select (string)results.Attribute("value") == "true";
|
||||||
|
|
||||||
|
if (preferences.Count() > 0 && preferences.First() == false)
|
||||||
|
{
|
||||||
|
autohide = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void show(string options = null)
|
||||||
{
|
{
|
||||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||||
{
|
{
|
||||||
this.popup.IsOpen = true;
|
if (popup.IsOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
popup.Child.Opacity = 0;
|
||||||
|
|
||||||
|
Storyboard story = new Storyboard();
|
||||||
|
DoubleAnimation animation;
|
||||||
|
animation = new DoubleAnimation();
|
||||||
|
animation.From = 0.0;
|
||||||
|
animation.To = 1.0;
|
||||||
|
animation.Duration = new Duration(TimeSpan.FromSeconds(0.2));
|
||||||
|
|
||||||
|
Storyboard.SetTarget(animation, popup.Child);
|
||||||
|
Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity"));
|
||||||
|
story.Children.Add(animation);
|
||||||
|
|
||||||
|
Debug.WriteLine("Fading the splash screen in");
|
||||||
|
|
||||||
|
story.Begin();
|
||||||
|
|
||||||
|
popup.IsOpen = true;
|
||||||
|
|
||||||
|
if (autohide)
|
||||||
|
{
|
||||||
|
DispatcherTimer timer = new DispatcherTimer();
|
||||||
|
timer.Tick += (object sender, EventArgs e) =>
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
};
|
||||||
|
timer.Interval = TimeSpan.FromSeconds(1.2);
|
||||||
|
timer.Start();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public void hide(string options)
|
|
||||||
|
|
||||||
|
public void hide(string options = null)
|
||||||
{
|
{
|
||||||
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
Deployment.Current.Dispatcher.BeginInvoke(() =>
|
||||||
{
|
{
|
||||||
this.popup.IsOpen = false;
|
if (!popup.IsOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
popup.Child.Opacity = 1.0;
|
||||||
|
|
||||||
|
Storyboard story = new Storyboard();
|
||||||
|
DoubleAnimation animation;
|
||||||
|
animation = new DoubleAnimation();
|
||||||
|
animation.From = 1.0;
|
||||||
|
animation.To = 0.0;
|
||||||
|
animation.Duration = new Duration(TimeSpan.FromSeconds(0.4));
|
||||||
|
|
||||||
|
Storyboard.SetTarget(animation, popup.Child);
|
||||||
|
Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity"));
|
||||||
|
story.Children.Add(animation);
|
||||||
|
story.Completed += (object sender, EventArgs e) =>
|
||||||
|
{
|
||||||
|
popup.IsOpen = false;
|
||||||
|
};
|
||||||
|
story.Begin();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ var SplashScreen = {
|
|||||||
localSplash.style.position = "absolute";
|
localSplash.style.position = "absolute";
|
||||||
|
|
||||||
localSplashImage = document.createElement("img");
|
localSplashImage = document.createElement("img");
|
||||||
localSplashImage.src = "img/splashscreen.png";
|
localSplashImage.src = "ms-appx:///images/splashscreen.png";
|
||||||
localSplashImage.style.position = "absolute";
|
localSplashImage.style.position = "absolute";
|
||||||
|
|
||||||
updateImageLocation();
|
updateImageLocation();
|
||||||
|
|||||||
Reference in New Issue
Block a user