Andorid Studio Webview App Lik Click New Tab Open Stop

[Solved] Andorid Studio Webview App Lik Click New Tab Open Stop | Swift - Code Explorer | yomemimo.com
Question : andorid studio webview app lik click new tab open stop

Answered by : habibur-rahman-qay4apajp5dq

@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String url ="http://dirtywasted.com/"; WebView view=(WebView) this.findViewById(R.id.webView); view.getSettings().setJavaScriptEnabled(true); view.setWebViewClient(new WebViewClient() { @Override public bool shouldOverrideUrlLoading(WebView view, String url) { //url will be the url that you click in your webview. //you can open it with your own webview or do //whatever you want //Here is the example that you open it your own webview. view.loadUrl(url); return true; } }); view.loadUrl(url);
}

Source : https://stackoverflow.com/questions/29023299/webview-stop-from-opening-links-in-browser-and-keep-in-app | Last Update : Mon, 13 Sep 21

Answers related to andorid studio webview app lik click new tab open stop

Code Explorer Popular Question For Swift