Great, thanks. That works fine, the focus stays on the web site that
is passed via the shouldOverrideUrlLoading methos and any other links
after this stay within the original webview.

Olivier

On Jul 3, 9:06 am, "Mark Murphy" <[EMAIL PROTECTED]> wrote:
> > When I pass a URL to the WebView, the content gets correctly
> > displayed. Now when I click any links in the displayed web page, the
> > entire view/screen is replaced by the browser, therefore the widgets
> > in the upper Layout are not visible anymore.
>
> I haven't played with that specific scenario, but the links are probably
> launching the built-in Browser activity.
>
> > Question: Is there a way to force ths user to browse and stay in the
> > original WebView rather than having the system passing it to the main
> > browser? Is that managed via Intents as the activity that listens for
> > web intents in Android is the main browser?
>
> One approach is to use setWebViewClient() to attach a WebViewClient to
> your WebView. Then, in your WebViewClient subclass, override
> shouldOverrideUrlLoading() and handle the link yourself (e.g., call
> loadUrl() on the WebView).
>
> There doesn't appear to be an API sample with the SDK that uses
> setWebViewClient(). You can grab the code from my book 
> athttp://commonsware.com/Android/-- there is a sample project
> (WebKit/Browser3) that shows how to use it setWebViewClient(), though it
> loads generated pages rather than URLs off the Interent.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ -- Available Now!

--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to