How a change the content size of a webview in android?

后端 未结 2 660
离开以前
离开以前 2021-01-18 05:13

I have a webview control in a scrollview. when i load a long html document into it, it resizes to accommodate it. this is correct. however, when i use the same control again

2条回答
  •  青春惊慌失措
    2021-01-18 05:38

    I had a similar problem and resolved it by clearing the view and re-measuring with a small size prior to loading the view again.

    e.g.

      webView.clearView();
      webView.measure(10, 10);
    

提交回复
热议问题