Photics wrote:
> I tried, but I couldn't get it to work.
> 
> 
>         mWebView.loadUrl("http://photics.com/games/conquest";);
>         mWebView.getSettings().setCacheMode
> (WebSettings.LOAD_NO_CACHE);
>         mWebView.setWebViewClient(new WebViewClient() {
>             public boolean shouldOverrideUrlLoading(WebView view,
> String url)
>             {
>                 if (url.contains("http://photics.com";)) {
>                     return false;
>                 }
>                 else return true;
>             }
>         });
> 
> 
> That makes my site links work, staying in the WebView, but the
> external links don't work at all.
> --~--~---------~--~----~------------~-------~--~----~

>From the documentation for shouldOverrideUrlLoading():

"If WebViewClient is provided, return true means the host application
handles the url, while return false means the current WebView handles
the url."

Your "else return true" line is telling Android "hey, I am going to
handle external links (by not doing anything)". You may wish to call
startActivity() on an ACTION_VIEW Intent on the URL or something.

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

Warescription: Three Android Books, Plus Updates, $35/Year

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

Reply via email to