Twitter Bootstrap not working in Android WebView
android, eclipse, html, twitter-bootstrap, webview
Solution
Add this line
webView.getSettings().setDomStorageEnabled(true);
Problem
HTML file(test.html) is ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <link href="bootstrap.css" rel="stylesheet" type="text/css"/> <link href="bootstrap-responsive.css" rel="stylesheet" type="text/css"/> </head> <body> <h1>Hello World!!!</h1> <a class="btn btn-primary btn-large"> Learn more </a> </body> </html> ``` HTML and bootstrap css files are placed in assets folder. If I open the HTML file in IE/Firefox, it is displayed correctly. But Android WebView does not render this properly Code for WebView is ``` WebView webView = (WebView) findViewById(R.id.webview); webView.getSettings().setJavaScriptEnabled(true); String url = "file:///android_asset/test.html"; webView.loadUrl(url); ``` IE renders it like this WebView renders it like this What is wrong?