Touchgui/plugins/org.apache.cordova.splashscreen/doc/index.md

changeset 0
e8ccd40d0ef6
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/index.md	Thu Jun 04 14:50:33 2015 +0200
     1.3 @@ -0,0 +1,88 @@
     1.4 +<!---
     1.5 +    Licensed to the Apache Software Foundation (ASF) under one
     1.6 +    or more contributor license agreements.  See the NOTICE file
     1.7 +    distributed with this work for additional information
     1.8 +    regarding copyright ownership.  The ASF licenses this file
     1.9 +    to you under the Apache License, Version 2.0 (the
    1.10 +    "License"); you may not use this file except in compliance
    1.11 +    with the License.  You may obtain a copy of the License at
    1.12 +
    1.13 +      http://www.apache.org/licenses/LICENSE-2.0
    1.14 +
    1.15 +    Unless required by applicable law or agreed to in writing,
    1.16 +    software distributed under the License is distributed on an
    1.17 +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    1.18 +    KIND, either express or implied.  See the License for the
    1.19 +    specific language governing permissions and limitations
    1.20 +    under the License.
    1.21 +-->
    1.22 +
    1.23 +# org.apache.cordova.splashscreen
    1.24 +
    1.25 +This plugin displays and hides a splash screen during application launch.
    1.26 +
    1.27 +## Installation
    1.28 +
    1.29 +    cordova plugin add org.apache.cordova.splashscreen
    1.30 +
    1.31 +
    1.32 +## Supported Platforms
    1.33 +
    1.34 +- Amazon Fire OS
    1.35 +- Android
    1.36 +- BlackBerry 10
    1.37 +- iOS
    1.38 +- Windows Phone 7 and 8
    1.39 +- Windows 8
    1.40 +
    1.41 +
    1.42 +## Methods
    1.43 +
    1.44 +- splashscreen.show
    1.45 +- splashscreen.hide
    1.46 +
    1.47 +### Android Quirks
    1.48 +
    1.49 +In your config.xml, you need to add the following preferences:
    1.50 +
    1.51 +    <preference name="SplashScreen" value="foo" />
    1.52 +    <preference name="SplashScreenDelay" value="10000" />
    1.53 +
    1.54 +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)
    1.55 +for more information.
    1.56 +
    1.57 +## splashscreen.hide
    1.58 +
    1.59 +Dismiss the splash screen.
    1.60 +
    1.61 +    navigator.splashscreen.hide();
    1.62 +
    1.63 +
    1.64 +### BlackBerry 10, WP8, iOS Quirk
    1.65 +
    1.66 +The `config.xml` file's `AutoHideSplashScreen` setting must be
    1.67 +`false`. To delay hiding the splash screen for two seconds, add a
    1.68 +timer such as the following in the `deviceready` event handler:
    1.69 +
    1.70 +        setTimeout(function() {
    1.71 +            navigator.splashscreen.hide();
    1.72 +        }, 2000);
    1.73 +
    1.74 +## splashscreen.show
    1.75 +
    1.76 +Displays the splash screen.
    1.77 +
    1.78 +    navigator.splashscreen.show();
    1.79 +
    1.80 +
    1.81 +Your application cannot call `navigator.splashscreen.show()` until the app has
    1.82 +started and the `deviceready` event has fired. But since typically the splash
    1.83 +screen is meant to be visible before your app has started, that would seem to
    1.84 +defeat the purpose of the splash screen.  Providing some configuration in
    1.85 +`config.xml` will automatically `show` the splash screen immediately after your
    1.86 +app launch and before it has fully started and received the `deviceready`
    1.87 +event. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)
    1.88 +for more information on doing this configuration. For this reason, it is
    1.89 +unlikely you need to call `navigator.splashscreen.show()` to make the splash
    1.90 +screen visible for app startup.
    1.91 +

mercurial