Note that there are some explanatory texts on larger screens.

plurals
  1. POJQueryMobile - styles not applied in Webview (Android)
    text
    copied!<p>I'm making use of "JqueryMobile" for building my android app. The problem I'm facing is that JQueryMobile styles are not getting applied for the page.. </p> <p>Here is the code of my HTML page (in Webview)</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width"&gt; &lt;title&gt;&lt;/title&gt; &lt;link href="css/styles.css" rel="stylesheet" type="text/css"&gt;&lt;/link&gt; &lt;script src="js/jquery.js"&gt;&lt;/script&gt; &lt;script src="js/jquery.mobile-1.0.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="home" data-role="page"&gt; &lt;div data-role="header"&gt;&lt;h1&gt;Categories&lt;/h1&gt;&lt;/div&gt; &lt;div data-role="content"&gt; &lt;h2&gt;Select a Category Below:&lt;/h2&gt; &lt;ul data-role="listview" data-inset="true"&gt; &lt;li&gt;&lt;a href="#category-items?category=animals"&gt;Animals&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#category-items?category=colors"&gt;Colors&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#category-items?category=vehicles"&gt;Vehicles&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and below is the code in my Activity class,</p> <pre><code> super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webView = (WebView)findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setDomStorageEnabled(true); webView.setWebChromeClient(new WebChromeClient()); webView.loadUrl("file:///android_asset/www/index.html"); </code></pre> <p>Any pointers on how to resolve it??</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload