How to clear WebView content?

Viewed 51524

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

Before I use webview.loadData, the width and height of the it was 0, after I load a page (or I use webview.loadData) , it'll display a web page.

My question is , how can I clear the webview to recover it back to the original state, just as before it loadData?

6 Answers

I used the clearView() method, however I'm now having issues that when I loadData() right after it, it doesn't seem to load the data.

Related