启动画面和启动画面index.html之后的白色屏幕应用程序构建包后触摸

时间:2013-09-26 19:23:38

标签: android ios extjs cordova sencha-touch-2

我构建了我的应用程序包,一切似乎工作正常,但它在启动屏幕后在设备上显示白屏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>

1 个答案:

答案 0 :(得分:1)

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