清晰的WebView内容 [英] clear WebView content

查看:76
本文介绍了清晰的WebView内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中的web视图与WRAP_CONTENT宽度和高度

i have a WebView in my app with wrap_content width and height

我使用webview.loadData,的是0的宽度和高度之前,

before i use webview.loadData , the width and height of the it was 0 ,

在我打开一个网址(或我使用webview.loadData),它会显示一个网页。

after i load a url(or i use webview.loadData) , it'll display a web page.

我的问题是,如何清除web视图,以回恢复到原来的状态,就像

my question is , how can i clear the webview to recover it back to the original state, just as

在它??

推荐答案

我发现这个答案pretty的帮助:<一href="http://stackoverflow.com/questions/4632590/how-do-i-clear-a-webviews-content-before-loading-a-page">How做我清除的WebView内容加载页面之前?

i found this answer pretty helpful: How do I clear a WebView's content before loading a page?

对于可可但是基本上只要致电:

was for cocoa but basically just call:

webView.loadUrl("about:blank")

这篇关于清晰的WebView内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆