Android: WebView unable to show '%' percentage sign
I try to play an html and js code in webview. the code contains the sign '%' and the webview return an error ERROR_BAD_URL.
<style type='text/css'>
test{
width: 100%;
height: 100%;
}
</style>
any idea?
-Z
use webview.loadDataWithBaseUrl
if .loadData
causes problems.
I ran into this myself this weekend. Use "%25" to make the % symbol. Your new code should look like ...
<style type='text/css'>
test{
width: 100%25;
height: 100%25;
}
</style>
try this
mWebView.loadDataWithBaseURL(null, html,"text/html", "UTF-8", null);
精彩评论