开发者

Android: WebView unable to show '%' percentage sign

开发者_如何学Go

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); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜