문제

When I'm loading a page using .loadData or .loadDataWithBaseURL, the system will load a page once.

After that, subsequent calls do not work.

In 4.0.3, if I were to call the function a second time with new data, it does change.

How can I fix this for 2.2+? Do I destroy the webview and create a new one?

webView1.loadDataWithBaseURL("file://", page, "text/html", "UTF-8", null);
webView1.loadUrl( "javascript:window.location.reload( true )" );
도움이 되었습니까?

해결책

In loadDataWithBaseURL, set the last parameter to the URL where that data came from, instead of null.

다른 팁

I think it should be "file:///". You just missed one slash.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top