From c56bb9efece65e8efbf203fbd60ce2b4e0b13b2e Mon Sep 17 00:00:00 2001 From: mbillau Date: Mon, 16 Jun 2014 13:43:32 -0400 Subject: [PATCH 1/2] Remove outdated doc, thx Axel --- doc/index.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/index.md b/doc/index.md index 00f7d24..d6d6b8c 100644 --- a/doc/index.md +++ b/doc/index.md @@ -43,15 +43,13 @@ This plugin displays and hides a splash screen during application launch. ### Android Quirks -In your config.xml, you need to add the following preference +In your config.xml, you need to add the following preferences: -`` +`` +`` -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. - -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);` +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. ## splashscreen.hide From 1f50d90d9e3ae6bb44df24f92bc06bb247fd4608 Mon Sep 17 00:00:00 2001 From: Nadya Atanasova Date: Thu, 19 Jun 2014 12:21:48 +0300 Subject: [PATCH 2/2] fixes Splashscreen crash on WP8 The UI elements cannot be accessed from any other than the UI thread directly. So, enclose UI access code in the Dispatcher.BeginInvoke() --- src/wp/SplashScreen.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wp/SplashScreen.cs b/src/wp/SplashScreen.cs index da519d5..4d3545b 100644 --- a/src/wp/SplashScreen.cs +++ b/src/wp/SplashScreen.cs @@ -95,13 +95,13 @@ namespace WPCordovaClassLib.Cordova.Commands public void show(string options = null) { - if (popup.IsOpen) - { - return; - } - Deployment.Current.Dispatcher.BeginInvoke(() => { + if (popup.IsOpen) + { + return; + } + popup.Child.Opacity = 0; Storyboard story = new Storyboard(); @@ -137,13 +137,13 @@ namespace WPCordovaClassLib.Cordova.Commands public void hide(string options = null) { - if (!popup.IsOpen) - { - return; - } - Deployment.Current.Dispatcher.BeginInvoke(() => { + if (!popup.IsOpen) + { + return; + } + popup.Child.Opacity = 1.0; Storyboard story = new Storyboard();