WebView loadUrl works only once

后端 未结 14 1739
长情又很酷
长情又很酷 2020-12-14 01:49

EDIT: I worked on this project years ago and unfortunately I cannot verify if any of the answers is working in the given scenario.

I am having hard time with one Web

14条回答
  •  粉色の甜心
    2020-12-14 02:24

    I have spent the last day or so working on an application that utilised a WebView. I did have a few issues with loading data into the WebView.

    I am not entirely sure this would work but perhaps replace this code:

    public void reLoadUrl() {
        wv.loadUrl(Constants.BLOG_URL);
    

    }

    with this code:

    public void reLoadUrl() {

        wv.clearView();
        wv.loadUrl(Constants.BLOG_URL);
    

    }

    maybe when you clear the WebView it will solve the issue

提交回复
热议问题