0

我构建了我的应用程序包,一切似乎都运行良好,但在启动屏幕后它在设备上显示白屏 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>
4

1 回答 1

1

我添加了cordova s​​plashscreen插件以避免corodova屏幕和sencha加载之间的白色,现在我使用的是与cordova一起提供的sencha touch2.3,所以我现在看不到任何白色屏幕。

于 2013-10-16T20:27:23.437 回答