Android WebView shows a blank page
- by Sara
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: