2011-09-01 81 views
3

我正在尝试使用Senahc Touch为Android设备构建一个Web应用程序并显示启动画面。我正在使用具有Ext.Setup属性的Sencha框架,您可以指定iPhone splashscreen。我已停止尝试使此参数起作用,现在只是试图使用标准HTML5元标记来加载启动画面。有没有人设法让基本的HTML5应用程序或完全的Sencha应用程序显示Android闪屏?Android Splash Screen WepApp Sencha

<!doctype html> 
<html> 
    <head> 
<meta charset="utf-8" /> 

<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/> 
<meta name="apple-mobile-web-app-capable" content="yes" /> 

<meta name="apple-mobile-web-app-status-bar-style" content="black" /> 
<link rel="apple-touch-startup-image" href="TSplash.gif" /> 

<script src="sencha-touch.js" type="text/javascript"></script> 
<link href="sencha-touch.css" rel="stylesheet" type="text/css" /> 

<script type="text/javascript"> 

       new Ext.Application({ 
          launch: function() { 
           new Ext.Panel({ 
            fullscreen : true, 
            html  : 'Hello World_7!' 
         }); 
        } 
       }); 
    </script> 
</head> 
<body></body> 
</html> 

回答

2

一种方法是将背景图像添加到您的html的正文。在您的活动js开始之前,您会在启动时看到它:

<HTML> 
    <head> 
     <title>Contacts</title> 
     <script type="text/javascript" src="sencha-touch.js"></script> 
     <link href="sencha-touch.css" rel="stylesheet" type="text/css" /> 
     <script type="text/javascript" src="phonegap-1.1.0.js"></script> 

     <script type="text/javascript" src="app/app.js"></script> 
     <link href="app/app.css" rel="stylesheet" type="text/css" /> 


    </head> 
    <body bgcolor="0000" style="background-image: url(TSplash.gif);"></body> 
</HTML>