Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
移除splashscreen cordova插件后,ionic 4 splashscreen仍显示白色屏幕_Cordova_Ionic Framework_Cordova Plugins - Fatal编程技术网

移除splashscreen cordova插件后,ionic 4 splashscreen仍显示白色屏幕

移除splashscreen cordova插件后,ionic 4 splashscreen仍显示白色屏幕,cordova,ionic-framework,cordova-plugins,Cordova,Ionic Framework,Cordova Plugins,我正试图隐藏启动屏幕。 我试过两种方法 首先,我将首选项更改为以下代码 <preference name="SplashMaintainAspectRatio" value="true" /> <preference name="FadeSplashScreenDuration" value="0" /> <preference name="SplashShowOnlyFirstTime" value="true" /> <pre

我正试图隐藏启动屏幕。 我试过两种方法 首先,我将首选项更改为以下代码

<preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="0" />
    <preference name="SplashShowOnlyFirstTime" value="true" />
    <preference name="SplashScreen" value="none" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashScreenDelay" value="0" />

其次,我删除了splashscreen插件


这些操作将删除闪屏,但白屏仍会显示三秒钟

您可以删除闪屏,但这不是一个好主意,因为这样会导致显示黑色或白色屏幕

每个Ionic/Cordova应用程序只需要一点时间来初始化,在准备就绪之前不会在屏幕上呈现任何内容。初始化完成后,应用程序即可使用,您可以删除启动屏幕。如果选中
src/app.component.ts
,您将发现以下行:

this.platform.ready().then(() => {
    this.splashScreen.hide();
});

您上面提到的首选项只是让您对启动屏幕的外观有额外的控制。

但是如何插入自定义启动屏幕(使用html代码创建)而不是图像?我正在使用app.component中的div标记,这将在白屏后显示。有没有办法在默认的splashscreen中使用html元素???