我构建了我的应用程序包,一切似乎都工作正常,但启动屏幕后在设备上显示白屏2秒钟。我在这个问题上看到了很多问题,但没有找到适合我的应用出现问题的解决方案。我正在使用手机间隙请帮帮我
这是我的index.html
<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
<meta
charset="UTF-8">
<meta
name="format-detection" content="telephone=no">
<title>Test APP </title>
<link href="touch/resources/css/app.css" rel="stylesheet" type="text/css" />
<script src="touch/sencha-touch-all-debug.js" type="text/javascript"></script>
<script src="js-cordova/ios/cordova-2.7.0.js" type="text/javascript"></script>
<script src="js-cordova/ios/barcodescanner.js"type="text/javascript"></script>
<script type="text/javascript">
document.addEventListener("deviceready", onDeviceReady,true);
document.addEventListener("backbutton", onBackKeyDown,false);
function onDeviceReady()
{
setTimeout(function()
{
navigator.splashscreen.hide();
},50000);
document.addEventListener("backbutton", onBackKeyDown,false);
}
</script>
<style type="text/css">
html, body {
height: 100%;
background-color: #7f1a1a;
background : url('uploads/Samsung.png') center no-repeat;
}
#appLoadingIndicator {
position: absolute;
top: 50%;
margin-top: -15px;
text-align: center;
width: 100%;
height: 30px;
-webkit-animation-name: appLoadingIndicator;
-webkit-animation-duration: 0.5s;
-webkit-animation-iteration-count: infinite;
}
#appLoadingIndicator > * {
display: inline-block;
height: 30px;
-webkit-border-radius: 15px;
margin: 0 5px;
width: 30px;
opacity: 0.8;
}
@-webkit-keyframes appLoadingIndicator{
0% {
opacity: 0.8
}
50% {
opacity: 0
}
100% {
opacity: 0.8
}
}
</style>
<!-- The line below must be kept intact for Sencha Command to build your application -->
<script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script>
</head>
<body>
<div id="appLoadingIndicator">
</div>
</body>
</html>
最佳答案
我添加了cordova启动画面插件,以避免corodova屏幕和sencha加载之间出现白色,现在我使用的是sencha touch2.3,它随cordova一起提供,所以我现在看不到任何白色屏幕。
关于android - 启动画面和启动画面之间的白色画面index.html应用构建包后的sencha touch,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/19036891/