1.在Manifest.xml文件里添加Inter网访问权限:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
2.在布局文件里声明一个WebView空间
<WebView
android:id="@+id/webView01"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:focusable="false" />
3.在Activity里实例化WebView对象,并打开网页
WebView webView = (WebView) findViewById(R.id.webView01);
protected void onResume() { super.onResume(); String url = "http://www.baidu.com"; webView.loadUrl(url); }