user1420042
user1420042

Reputation: 1709

Why is does my webview in my android not display my html file correctly?

I have an html file that displays an equation. The html file uses this library ( http://mathscribe.com/author/jqmath.html ). In a web browser everything works fine. The problem is when i load that html file into my webview in my app. the actual html command in the body does not convert into an equation like it did in the web browser. What is the problem here?

I placed the html file and the jquery library in the assets folder in my app. The command to load the html file is:

mWebView.loadUrl("file:///android_asset/quadratic.html");

Upvotes: 1

Views: 436

Answers (2)

AndreiBogdan
AndreiBogdan

Reputation: 11164

Try enabling Javascript in the WebView

someWebView.getSettings().setJavaScriptEnabled(true);

and let us know if it works :)

Upvotes: 1

Ian Warwick
Ian Warwick

Reputation: 4784

have you enabled javascript on the webview?

mWebView.getSettings().setJavaScriptEnabled(true);

Upvotes: 1

Related Questions