开发者

Android Splash Screen WepApp Sencha

I am trying to build a web app for Android device using Senahc Touch and display a splash screen. I was using the Sencha framework which has a Ext.Setup property that you can specify the iPhone splashscreen. I've stopped trying to get this parameter to work and am now just trying to use standard HTML5 meta tags to load the splash screen. Has anyone ever managed to get the Android splash scren displayed either in a basic HTML5 app or a fullyblown Sencha app?

<!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>


One way is to add a background image to the body of your html. You see it on startup for a moment before your activity's js kicks in:

<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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜