views:

84

answers:

2

I'm making an application that contains button's and those buttons control an embedded browser. My problem is that I want to see the button's and the web page in the same layout, but when i click on a button this will open a web page and don't show the button, can anyone help me?

+1  A: 

You need to use a Layout that supports more than one child. Take a look here

synic
+1  A: 

If I understand correctly your problem is that following a link opens the standard browser not your WebView, right ?

Add this to your WebView to change that behavior

// this is to prevent that when clicking a new URL from the displayed
// page the default web browser launches
webView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
});
dtmilano
Thank you, is that what i looking for.
sgiro