WebView on Android 7.0+ doesn't render page

不问归期 提交于 2019-12-03 03:45:37

From Android doc

This is pre Android N

@Deprecated
public boolean shouldOverrideUrlLoading(WebView view, String url) {
    return false;
}

This is since Android N

  • @return True if the host application wants to leave the current WebView
    • and handle the url itself, otherwise return false.
@Override
    public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
        return true;
    }

This method is from Android N , so for this reason you have this issue only in Android N. Returning false you should solve your problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!