Derek Lawrence
Derek Lawrence

Reputation: 1608

Xamarin Android - Load url in second webview

Hi I wanted to load up a webview on android. And when a link is clicked in this webview to override the loading and have the link load in another webview. So I can display the first webview without having to reload the page.

Upvotes: 0

Views: 308

Answers (1)

Steven Mark Ford
Steven Mark Ford

Reputation: 3432

You could do the following:

  1. set a custom webview client on your webview webView.SetWebViewClient(new MyWebviewClient(this));
  2. In your webview client override ShouldInterceptRequest

  3. In ShouldInterceptRequest method use the url parameter to create/show a new webview and then just return the current displayed data to prevent loading a new webview.

Upvotes: 1

Related Questions