Redirect to another activity when link in webView is pressed

时间:2018-05-06 17:10:43

标签: android webview android-webview

What I want to achieve: I have a webView in Activity A.I want to get the url and redirect to next Activity (Activity B) when link from webView in Activity A is pressed.Below is my code and shouldOverrideUrlLoading is not called when I press link in webView from Activity A.

context

1 个答案:

答案 0 :(得分:0)

您可以覆盖public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request)方法