Ionic (phonegap)-splashscreen settings

Source: Internet
Author: User
Ionic (PHONEGAP)-After packaging app startup interface disappears black screen

tags (space delimited): Ionic splashscreen Community Questions

StackOverflow

$  Ionic Resources
   or 
$ ionic--icon  # #单独生成应用图标
$ ionic Resources--splash  # # Individual build should start picture

Ionic will upload your icon to its server and then return to you, so must be able to surf the Internet, note: The icon must be. Png,.psd.ai cannot be changed
by another icon. After successful execution, the code will be generated under your Config.xml:
Add SplashScreen plugin

But you may find that your splash screen is not, may be black a bit to the application, no matter how you change your config.xml is no effect, after several toss found the solution:

$ Cordova Plugin Add Cordova-plugin-splashscreen
Configure Config.xml
# #默认只有SplashScreen和SplashScreenDelay
  <preference name= "SplashScreen" value= "screen"/>
  < Preference name= "Splashscreendelay" value= "10000"/> #显示时间 <preference name= "Autohidesplashscreen"
  False "/> #禁止自动隐藏
  <preference name=" Auto-hide-splash-screen "value=" false "/> #禁止自动隐藏
  < Preference name= "Fadesplashscreen" value= "false"/> #禁用淡出效果 <preference name=
  "Splashmaintainaspectratio" Value= "true"/> #图像cover屏幕
  <preference name= "Showsplashscreenspinner" value= "false"/> #隐藏加载灰圈
  < Preference name= "Splashshowonlyfirsttime" value= "false"/> #每次重新启动都显示

App.js

Document.addeventlistener ("Deviceready", Ondeviceready, false);    
function Ondeviceready () {    
  navigator.splashscreen.hide ();    
} 
If you are using Ionic, add
navigator.splashscreen.hide () directly in the. Run ().   

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.