开发者

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

开发者 https://www.devze.com 2022-12-19 21:59 出处:网络
when i load a url in a webview. 开发者_JAVA技巧it loads perfectly. but i touch anything in that webview its redirected to the browser by default.

when i load a url in a webview. 开发者_JAVA技巧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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号