tags:

views:

59

answers:

1

Hi,

In one of my xml layouts I use an webview (besides other TextViews) for which I call loadUrl("myURL") to display the content from a url. The desired effect is to have displayed in a screen all the other textViews , and below them the content of web page. However when the webview loads the URL , it starts a new activity and displays the content in that activity, which is not what I need. Any ideas on how I could force the described behavior ?

Later edit:

I have succeed to have layout with several views mixed, one of them being the webview .Also I have succeed to obtain the described above behavior. But only after I setted a WebView client with setWebViewClient(WebViewClient); . Now I'd like to know why does it work like this only after a webViewClient is set ?

A: 

You have to use RelativeLayout as container for webview and other views. And set to webView new WebViewClient with overridden shouldOverrideUrlLoading method.

Lego