开发者

Why image loads on text in webview in android?

web= (WebView)findViewById(R.id.webview);
 WebSettings webSettings = web.getSettings();
    webSettings.setTextSize (WebSettings.TextSize.NORMAL) ;
    web.setBackgroundColor(0);
    webSettings.setLoadsImagesAutomatically(true);
    webSettings.setSupportMulti开发者_运维技巧pleWindows(true);
    webSettings.setSupportZoom(true);
    webSettings.setBuiltInZoomControls(true);

    web.loadDataWithBaseURL("", "<p dir=\"rtl\" align=\"right\">" + desc + "</p>", "text/html", "utf-8", "");

`

Why image loads on text in webview in android?

i have a problem in the webview that when it loads the image it's loaded on the text which makes the text corrupted as shown in the image knowing that both i get them by connection to service any ideas how to solve this


It's a problem with android webviews ,You can solve it with putting the height to tag. --> height="imageHeight" ..or a margin-bottom equal to his height.. this is not a good solution but is the is the only one I found.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜