0
I tried my set my webview to open more than one link, but n works
my code makes websites.google open in the webview of the app and the rest of the links open out(android Nav), I want the sites.google and photos.google open in the webview of the app
private class MyWebviewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Uri.parse(url).getHost().equals("sites.google.com")) {
//abrir no meu webview AQUI EU GOSTARIA DE ADC OUTRO
return false; LINK PARA ABRIR NO MEU WV
} else {
//restante dos links abrir no navegador
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
return true;
}
}
An example
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Uri.parse(url).getHost().equals("sites.google.com") && ("photos.google.com")) {
but that doesn’t work, is there any way to do it? if yes someone knows another way?