Photics wrote:
> I like this tutorial...
> http://developer.android.com/guide/tutorials/views/hello-webview.html
> 
> ...but it doesn't explain how to handle new windows.
> 
> It says, "What we've done is create a WebViewClient that will load any
> URL selected in our WebView in the same WebView."
> 
> ...but what if you don't want "ANY" URL, only URL's from your domain.
> Say some clicks an advertisement, or a link to another website, do we
> really want the user stuck in someone's app?
> 
> So this is the line of code...
> webview.setWebViewClient(new WebViewClientDemo());
> 
> ...and I went here...
> http://developer.android.com/reference/android/webkit/WebViewClient.html
> 
> ...but I didn't see how it would be possible to distinguish between my
> domain and other domains. 

Implement shouldOverrideUrlLoading() in WebViewClient to do whatever you
want, based on the supplied URL.

> Is this a limitation of Android's WebKit?

No.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Beginning Android_ from Apress Now Available!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to