Android   发布时间:2019-10-14  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Splashscreen大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_616_0@ @L_747_0@methods

Permissions

Android

app/res/xml/config.xml

iOS

Cordova.plist

    

Setup

Android

  1. Copy your splash screen imagE into the res/drawable directories of your Android project. The sizes of each image should be:

    it is highly recommended that you use a  for your splash screen.

  2. In the onCreate method of the class that extends DroidGap add the following two lines:

    The first line 'super.setIntegerProperty' sets the image to be displayed as the splashscreen. If you have named your image anything other than splash.png you will have to modify this line. The second line is the normal 'super.loadUrl' line but it has a second parameter which is the timeout value for the splash screen. In this example the splash screen will display for 10 seconds. If you want to dismiss the splash screen once you get the "" event you should call the navigator.splashscreen.() method.

iOS

  1. Copy your splash screen images into the Resources/splash directory of your iOS project. Only add the images for the devices you want to support (iPad screen size or iPhone screen size). The sizes of each image should be:

    • Default-568h@2x~iphone.png (640x1136 pixels)
    • Default-Landscape@2x~ipad.png (2048x1496 pixels)
    • Default-Landscape~ipad.png (1024x748 pixels)
    • Default-Portrait@2x~ipad.png (1536x2008 pixels)
    • Default-Portrait~ipad.png (768x1004 pixels)
    • Default@2x~iphone.png (640x960 pixels)
    • Default~iphone.png (320x480 pixels)

show

Displays the splash screen.

);

Description

navigator.splashscreen.() displays the applications splash screen.

Supported Platforms

  • Android
  • iOS

Quick Example

);

Full Example

      
   
   
   
        documentfalse);
   
        {        navigator);   
   
        616_0@ 
@H_616_0@ hide

Dismiss the splash screen.

);

Description

navigator.splashscreen.() dismisses the applications splash screen.

Supported Platforms

  • Android
  • iOS

Quick Example

);

Full Example

      
   
   
   
        documentfalse);
   
        {        navigator);   
   
        616_0@ 

iOS Quirk

  1. In your Cordova.plist,you need to  for "AutoHideSplashScreen” to false

  2. Then,if you want to delay hiding the splash screen for 2 seconds,you can do this in your http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#deviceready">deviceready event handler:

    {    navigator););

大佬总结

以上是大佬教程为你收集整理的Splashscreen全部内容,希望文章能够帮你解决Splashscreen所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:Splashscreen