IBM Worklight 6.0 - 在加载框架库和css时,在混合应用程序(使用Dojo工具包1.9)中获得了明显的瑕疵?

时间:2013-07-18 05:26:17

标签: android dojo ibm-mobilefirst

当页面在应用程序中加载时,框架库和CSS加载需要几秒钟,我得到一个明显的昙花一现。如何防止这种情况发生?

我曾尝试在运行os 2.2版的Android虚拟设备上运行。我还在运行os 4.1版的实际设备上试过它。

.html文件:

<!DOCTYPE HTML>
<html>
        <head>
            <meta charset="UTF-8">
            <title>Accordfintech</title>
<meta name="viewport"
    content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" href="images/favicon.png">
            <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
            <link rel="stylesheet" href="css/Accordfintech.css">
            <script>window.$ = window.jQuery = WLJQ;</script>
            <script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script>
            <script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script>
            <style>
            .col_M{margin:5px 7px 0 7px;}
            </style>
        </head>

        <body id="content" style="display: none;">
        <div data-dojo-type="dojox.mobile.Heading"
            data-dojo-props="label:'Accord Fintech'" style="background-color: #10537b; color: black">
        <img src="images/Accord.png" align="left" style="margin: 8px 0px 0px 8px">
        </div>
        <div data-dojo-type="dojox.mobile.ScrollableView" id="view0" data-dojo-props="selected:true">
        <div data-dojo-type="dojox.mobile.RoundRectList">
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'About Us',moveTo:'abview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/about_us.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Software',moveTo:'swview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/software_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Database',moveTo:'dbview',transition:'flip',dir:'1'" style="background-color: #00bcf2" icon="images/Database_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Products',moveTo:'prview',transition:'flip',dir:'1'" style="background-color: #00bcf2" icon="images/products_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Research',moveTo:'resview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/Research_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Contact Us',moveTo:'cuview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/Contact_us.png"></div>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="abview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'About Us',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p><strong>Accord Fintech Pvt. Ltd.</strong> is an ISO 9001:2008 certified company, set up by a team of professionals with competencies in Financial content, software development and database design using a variety of platforms, technologies and financial domain knowledge.</p>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="swview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Software',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p>We can offer you a typically 'made - to - order' solution, based on your requirements.</p>
        <p>We are well versed with website development, intranet and extranet solutions.</p>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="dbview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Database',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p>The Database of Accord Fintech is the absolute solution for all financial analysis requirements, comprising listed companies traded on India's major stock exchanges.</p>
        </div>
    </div>


    <div data-dojo-type="dojox.mobile.ScrollableView" id="prview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Products',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p><strong>ACCORD</strong> offers a wide range of products and solutions designed specially for enterprises and small businesses across a variety of industries. 
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="resview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Research',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p>We are a professionally managed growing research house providing intelligence on every aspect of Indian business, finance and markets.</p>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="cuview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Contact Us',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p><strong>Customer Support contacts:</strong></p><br/>
        </div>
        </div>
            <script src="js/initOptions.js"></script>
            <script src="js/Accordfintech.js"></script>
            <script src="js/messages.js"></script>
        </body>
</html>

快照:

在启动画面后,它会显示内部内容:

enter image description here

完全加载包和css文件后:

enter image description here

然而,这只发生了几分钟,但我怎么能避免这种情况呢?

1 个答案:

答案 0 :(得分:3)

您是否在您的身体元素上放置了“visibility:hidden”?您需要放置它(并删除某些工作灯版本正在添加的“display:none”),并且Dojo Mobile将确保在准备好显示屏幕时将其删除。