Hi Mark,

Yeah the setSupportMultipleWindows() call has no effect. I tried this:

  mWebView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url)
{
      mWebView.loadUrl(url);
      return true;
    }
    @Override
    public void onPageStarted(WebView view, String url, Bitmap
favicon) {
      Log.d("@@@", "start loading page....");
    }
    @Override
    public void onPageFinished(WebView view, String url) {
      Log.d("@@@", "finish loading page....");
    }
  });

in an attempt to force any url loading to happen within the same
webview instance. It seems to work, but it seems odd to have to do
this, I thought this would be more like the default behavior of
WebView.

The onPageFinished() override is called, the onPageStarted override is
not, which is also confusing,

Thanks



On Nov 5, 10:09 am, Mark Murphy <[email protected]> wrote:
> Mark Wyszomierski wrote:
> > I have a WebView inside my app. It looks like an html link which wants
> > to open a page in a new frame actually pushes my app to the background
> > and opens the system web browser to show the new page.
>
> That's to be expected, just like a redirect will trigger Browser.
>
> > Is there a way to force new pages to simply open right in my own
> > WebView? Not sure if one of these do it?:
>
> >     mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically
> > (false);
> >     mWebView.getSettings().setSupportMultipleWindows(true);
>
> You could try the multiple-windows one. If that does not work, you
> probably need to attach a WebViewClient, intercept the request for the
> new frame, and arrange to display it however you wish.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 1.2 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