Phonegap& Cordova - 如何清除默认启动屏幕? [英] Phonegap & Cordova - How to remove default splash screen?
问题描述
当我开始使用我的应用程式时,会显示常见的启动画面:
我一直忽略它,直到我完成应用程序,现在我几乎完成发布,并希望解决这个问题。
我想知道是否有办法完全取出闪屏。我尝试从res / xml中删除图片并添加
< preference name =SplashScreenvalue =none/> ;
但不起作用。
这是一个Android应用程序。
我将在iOS完成并发布为Android后,使它,所以如果他们是不同的平台,不同的方法,请include。
Cordova关于图标和闪屏的文档是:
https://cordova.apache.org/docs/en/latest /config_ref/images.html
但如果您需要更多控制闪屏(通过JS),您可以添加此插件:
https://github.com/apache/cordova-plugin- splashscreen
When I used to start up my app, it would show the common splash screen: https://www.google.com/search?biw=1366&bih=667&tbm=isch&sa=1&q=cordova+android+splash+screen&oq=cordova+android+splash+screen&gs_l=img.3...3442.4414.0.4584.0.0.0.0.0.0.0.0..0.0....0...1c.1.64.img..0.0.0.HlLmVH4tGUs#imgrc=HJeAimnld9GDKM%3A
Now it seems it cuts off about 1/10th of the top of the image and covers the screen with it for the initial few seconds, THEN my app starts normally, like so:
I have been ignoring it until I finished the app, now I am nearly done publishing and wish to fix this issue.
I was wondering if there is a way to take out the splash screen entirely. I tried removing the pictures from res/xml and adding
<preference name="SplashScreen" value="none"/>
but doesn't work.
This is for an android app.
I am going to make it for iOS soon after I finish and publish for android, so if they are different methods for different platforms, please include.
The Cordova documentation about icons and splash screens is:
https://cordova.apache.org/docs/en/latest/config_ref/images.html
but if you need more control over splash screens (via JS) you can add this plugin:
https://github.com/apache/cordova-plugin-splashscreen
这篇关于Phonegap& Cordova - 如何清除默认启动屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!