Android WebView shows a blank page

Posted by Sara on Stack Overflow See other posts from Stack Overflow or by Sara
Published on 2010-04-02T17:18:23Z Indexed on 2010/04/02 17:23 UTC
Read the original article Hit count: 1233

Filed under:
|
|

Trying to create a WebView but it only shows a blank/white page. I have followed several examples and they all say that work with this code...

Here is my code:

import android.app.Activity; import android.os.Bundle; import android.webkit.WebView;

public class PostenWebView extends Activity {

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.web_view);
    WebView webview = (WebView)findViewById(R.id.webview);
    webview.loadUrl("http://www.google.com");
}

}

And here is the web_view.xml:

© Stack Overflow or respective owner

Related posts about android

Related posts about webview