I'am newbie in Android programming and I want to us jqMath to display some math formulas in WebView.
Here is my code:
WebView webView = (WebView)findViewById(R.id.webView1);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
String js = "<html><head>"
+ "<link rel='stylesheet' href='jqmath-0.4.0.css'>"
+ "<script src='jquery-1.4.3.min.js'></script>"
+ "<script src='jqmath-etc-0.4.0.min.js'></script>"
+ "</head><body>"
+ "<script>var s = '$ax^2+bx+c=0$ with $a≠0$';M.parseMath(s);document.write(s);</script></body>";
webView.loadData(js, "text/html", "UTF-8");
What is the problem of this code?,
UPDATE
well my problem have solved, but I also changed loadData function to loadDataWithBaseURL
I mention just for reference if anyone else have same problem
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…