<uses-sdk android:minSdkVersion="○○" />○○には選んだバージョン番号が入っています。この後に、以下の文を追記してください。
<uses-permission android:name="android.permission.INTERNET" />これは、アプリでインターネットへのアクセスを許可するためのパーミッション設定です。これにより、オンライン経由でjQuery Mobileのライブラリがロードできるようになります。
<link rel="stylesheet"アプリに限らず普通のWebサイトでも、この3行を記述してやることでjQuery Mobileの機能が使えるようになります。なおjQuery Mobileの使い方については別途入門を用意してあるのでそちらを参考にしてください。
href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.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.1/jquery.mobile-1.0.1.min.js"></script>
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
<!DOCTYPE html> <html> <head> <title>My Page</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.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.1/jquery.mobile-1.0.1.min.js"></script> </head> <body> <!-- home page --> <div id="home" data-role="page"> <div data-role="header"> <h1>Sample</h1> </div> <div data-role="content"> <h2>Sample Page</h2> <p id="msg">※これはサンプルで作ったページです。</p> <button>click</button> </div> </div> </body> </html>
<< 前へ |