Android WebView TimeOut

后端 未结 2 1444
故里飘歌
故里飘歌 2020-12-03 14:23

Is there a way to set the timeout value in WebView? I want the WebView to be timeouted if the url is too slow to response.

2条回答
  •  长情又很酷
    2020-12-03 14:37

    You can do it by setting up a Timer which checks for progress of current page by calling getProgress() and if it is less than some threshold after some specified time then you can dismiss the loading of the current page.

提交回复
热议问题