2016-05-21 23 views
0

我是新来的apache cordova,我正在使用jquery mobile和nativedroid2制作数据收集应用程序。我使用的代码是这样的:使用jquery mobile和nativedroid2,按钮不会在apache cordova中显示图标。我如何显示它们?

<!DOCTYPE html> 
 
<!-- 
 
    Licensed to the Apache Software Foundation (ASF) under one 
 
    or more contributor license agreements. See the NOTICE file 
 
    distributed with this work for additional information 
 
    regarding copyright ownership. The ASF licenses this file 
 
    to you under the Apache License, Version 2.0 (the 
 
    "License"); you may not use this file except in compliance 
 
    with the License. You may obtain a copy of the License at 
 

 
    http://www.apache.org/licenses/LICENSE-2.0 
 

 
    Unless required by applicable law or agreed to in writing, 
 
    software distributed under the License is distributed on an 
 
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
 
    KIND, either express or implied. See the License for the 
 
    specific language governing permissions and limitations 
 
    under the License. 
 
--> 
 
<html> 
 
    <head> 
 
     <!-- 
 
     Customize this policy to fit your own app's needs. For more guidance, see: 
 
      https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy 
 
     Some notes: 
 
      * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication 
 
      * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly 
 
      * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this: 
 
       * Enable inline JS: add 'unsafe-inline' to default-src 
 
     --> 
 
     <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> 
 
     <meta name="format-detection" content="telephone=no"> 
 
     <meta name="msapplication-tap-highlight" content="no"> 
 
     <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> 
 
     <link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css"> 
 
     <link rel="stylesheet" type="text/css" href="css/index.css"> 
 
     <link rel="stylesheet" type="text/css" href="css/nativedroid2.css"> 
 
     <link rel="stylesheet" type="text/css" href="css/waves.min.css"> 
 
     <link rel="stylesheet" type="text/css" href="css/animate.css"> 
 

 
     <title>Sales | DocNme</title> 
 
    </head> 
 
    <body> 
 
     <!-- <div class="app"> 
 
      <h1>Apache Cordova</h1> 
 
      <div id="deviceready" class="blink"> 
 
       <p class="event listening">Connecting to Device</p> 
 
       <p class="event received">Device is Ready</p> 
 
      </div> 
 
     </div> 
 
     --> 
 

 
     <div data-role = "page" id = "page-1"> 
 
       <div data-role = "header"> 
 
       </div> 
 
       <div data-role = "main" class = "ui-content"> 
 
       </div> 
 
       <div data-role = "footer" data-position="fixed" style="border:none;"> 
 
        <div align="center" style = "position:relative;"><img src="img/load.GIF" height="50" width="50"></div> 
 
        <p align="center" style="position:relative;">Loading...</p> 
 
       </div> 
 
     </div> 
 

 
     <div data-role = "page" id = "page-2"> 
 
      <div data-role="header" data-position="fixed" data-tap-toggle="false"> 
 
     <!--<img class="logo" src="img/logoTagline.png"/>--> 
 
       <span class="logo"></span> 
 
      </div> 
 
       <div role="main" class="ui-content wow fadeIn" data-wow-delay="0.5s"> 
 
        <h3>Sign In</h3> 
 
        <div id="signin-error-msg" class="ui-bg clr-bg-red"> 
 
         <i class="zmdi zmdi-alert-triangle"></i> <span id="signin-error-msg-text"></span> 
 
        </div> 
 
        <label for="signin-username">User Name:</label> 
 
        <input type="text" name="signin-username" id="signin-username" value="" placeholder="[email protected]" /> 
 
        <label for="signin-password">Password:</label> 
 
        <input type="password" name="signin-password" id="signin-password" value="" placeholder="Enter your password here..." /> 
 
        <div class="row center-xs"> 
 
         <div class="col-xs"> 
 
          <div class="box"> 
 
            <a href="#page-3" class="ui-btn ui-btn-raised">Sing In</a> 
 
          </div> 
 
         </div> 
 
        </div> 
 

 
        <a href="#page-4" class="ui-btn 
 
          ui-btn-inline 
 
          ui-btn-fab 
 
          ui-btn-fab-bottom 
 
          ui-btn-raised 
 
          clr-primary waves-effect waves-button waves-effect waves-button"></a> 
 
       </div> 
 
     </div> 
 

 
     <div data-role = "page" id = "page-3" class="nd2-no-menu-swipe"> 
 

 
      <div data-role = "header" data-position="fixed" data-tap-toggle="false" style="background-color:rgb(60,190,205)"> 
 

 
        <!-- <div class="col-sm-4 col-xs-6" data-name="arrow-back"> 
 
         <div class="box"> --> 
 
          <a href="#page-2" class="ui-btn ui-btn-left"><i class="zmdi zmdi-refresh"></i></a> 
 
         <!-- </div> 
 
        </div> 
 
--> 
 
        <ul data-role="nd2tabs" data-swipe="false"> 
 

 
         <li data-tab="friends">Friends</li> 
 
         <li data-tab="work" data-tab-active="true">Work</li> 
 

 
        </ul> 
 

 
      </div> 
 

 
      <div data-role="main" class="ui-content wow fadeIn" data-inset="false" data-wow-delay="0.2s"> 
 
        
 
        <div data-role="nd2tab" data-tab="friends"> 
 

 
        <!-- <nd2-ad data-banner="sample.banner"></nd2-ad> --> 
 

 
              <ul data-role="listview" data-icon="false"> 
 
               <li data-role="list-divider"> 
 
                Friends 
 
               </li> 
 
               <li> 
 
                <a href="#"> 
 
                 <img src="img/smile.png" class="ui-thumbnail ui-thumbnail-circular" /> 
 
                 <h2>Ethel Chancy</h2> 
 
                 <p>[email protected]</p> 
 
                </a> 
 
               </li> 
 
               <li> 
 
                <a href="#"> 
 
                 <img src="img/smile.png" class="ui-thumbnail ui-thumbnail-circular" /> 
 
                 <h2>Lorean Gainer</h2> 
 
                 <p>[email protected]</p> 
 
                </a> 
 
               </li> 
 
               <li> 
 
                <a href="#"> 
 
                 <img src="img/smile.png" class="ui-thumbnail ui-thumbnail-circular" /> 
 
                 <h2>Juliet Gieseke</h2> 
 
                 <p>[email protected]</p> 
 
                </a> 
 
               </li> 
 
              </ul> 
 

 

 
        </div> 
 

 

 
        <div data-role="nd2tab" data-tab="work"> 
 

 
        <!-- <nd2-ad data-banner="sample.banner"></nd2-ad> --> 
 

 
              <ul data-role="listview" data-icon="false"> 
 
               <li data-role="list-divider"> 
 
                Work 
 
               </li> 
 
               <li> 
 
                <a href="#"> 
 
                 <img src="img/smile.png"/> 
 
                 <h2>Ethel Chancy</h2> 
 
                 <p>[email protected]</p> 
 
                </a> 
 
               </li> 
 
               <li> 
 
                <a href="#"> 
 
                 <img src="img/smile.png"/> 
 
                 <h2>Lorean Gainer</h2> 
 
                 <p>[email protected]</p> 
 
                </a> 
 
               </li> 
 
               <li> 
 
                <a href="#"> 
 
                 <img src="img/smile.png"/> 
 
                 <h2>Juliet Gieseke</h2> 
 
                 <p>[email protected]ow.com</p> 
 
                </a> 
 
               </li> 
 
              </ul> 
 

 
        </div> 
 

 
      </div> 
 
     </div> 
 

 
     <div data-role = "page" id = "page-4"> 
 
       page 4 
 
     </div> 
 

 

 
     <script type="text/javascript" src="js/jquery-1.12.3.min.js"></script> 
 
     <script type="text/javascript" src="js/jquery-ui.min.js"></script> 
 
     <script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script> 
 
     <script type="text/javascript" src="cordova.js"></script> 
 
     <script type="text/javascript" src="js/waves.min.js"></script> 
 
     <script type="text/javascript" src="js/wow.min.js"></script> 
 
     <script type="text/javascript" src="js/nativedroid2.js"></script> 
 
     <script type="text/javascript" src="js/index.js"></script> 
 

 
    </body> 
 
</html>

在上面的代码,我想在divid = "page-3"的标题部分显示的图标不会在屏幕上显示出来。请帮助我。提前致谢。 the image将显示我已突出显示的红色圆圈内的刷新图标,但没有任何内容

+0

尝试在该锚标记中添加'data-role =“按钮”role =“button”'后。 –

+0

没有变化。 ;(令人惊讶的是,如果我点击该区域导航到其他页面,但该图标仍然不可见, – Horcrux

+0

这意味着'css/material-design-iconic-font.min.css'未加载。 只是将它添加到你的项目中,你应该很好去。@horcrux –

回答

0

在CSS包含的末尾添加此引用。

 
href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css" 
相关问题