下面是项目截图:
对照上面的项目截图。如果还没有jquery-mobile,没关系。 注意 然后。 1.在AndroidManifest.xml中添加如下xml代码: Xml代码 - <supports-screens
- android:largeScreens="true"
- android:normalScreens="true"
- android:smallScreens="true"
- android:resizeable="true"
- android:anyDensity="true"
- />
- <uses-permission android:name="android.permission.CAMERA" />
- <uses-permission android:name="android.permission.VIBRATE" />
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
- <uses-permission android:name="android.permission.READ_PHONE_STATE" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.RECEIVE_SMS" />
- <uses-permission android:name="android.permission.RECORD_AUDIO" />
- <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
- <uses-permission android:name="android.permission.READ_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.GET_ACCOUNTS" />
- <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden">
- <intent-filter> </intent-filter>
- </activity>
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>PhoneGap</title>
- <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
- </head>
- <body>
- <h1>Hello World</h1>
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>html app</title>
- <script type="text/javascript" charset="utf-8"
- src="js/phonegap-1.2.0.js"></script>
- <!--<link rel="stylesheet"
- href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
- <script type="text/javascript"
- src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
- <script type="text/javascript"
- src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
- -->
- <link rel="stylesheet"
- href="css/jquery.mobile-1.0.min.css" />
- <script type="text/javascript"
- src="js/jquery-1.6.4.min.js"></script>
- <script type="text/javascript"
- src="js/jquery.mobile-1.0.min.js"></script>
- </head>
- <body>
- <div data-role="page">
- <div data-role="header">
- <h1>My Title</h1>
- </div><!-- /header -->
- <div data-role="content">
- <p>Hello world</p>
- </div><!-- /content -->
- <ul data-role="listview" data-inset="true" data-filter="true">
- <li><a href="#">Acura</a></li>
- <li><a href="#">Audi</a></li>
- <li><a href="#">BMW</a></li>
- <li><a href="#">Cadillac</a></li>
- <li><a href="#">Ferrari</a></li>
- </ul>
- </div><!-- /page -->
- </body>
- </html>