Praveen
Praveen

Reputation: 91185

how to make links load or refresh within a webview in android?

when i load a url in a webview. it loads perfectly.

but i touch anything in that webview its redirected to the browser by default.

how to set that link will load in the same webview itself.

thanks.

Upvotes: 3

Views: 4147

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007359

Implement a WebViewClient, overriding shouldOverrideUrlLoading() to tell Android what you want to do on link clicks. Attach that WebViewClient to the WebView via setWebViewClient().

Upvotes: 3

Related Questions