2013-07-18 55 views
2

當頁面在應用程序中加載時,加載框架庫和CSS需要幾秒鐘,並且我得到一個明顯的blip。如何防止發生這種情況?IBM Worklight 6.0 - 在加載框架庫和css時,在混合應用程序(使用Dojo工具包1.9)中獲得一個明顯的blip?

我曾嘗試過運行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

但是,這隻發生在幾秒鐘內,但我該如何避免這種情況?

回答

3

你把「知名度:隱藏」在你的身體元素?您需要將其放入(並刪除某些Worklight版本添加的「display:none」),並且Dojo Mobile在準備顯示屏幕時將確保將其刪除。

+0

thanx for ur reply .... it works for me ... – UjjawalKr

相關問題