1、Android开发中有一个WebView控件,用于加载web页面
2、在布局xml文件中使用,如下
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"/>
如果你想用别的方式来打开网站
private void test(){
Uri uri = Uri.parse("http://www.csdn.net");
startActivity(new Intent(Intent.ACTION_VIEW,uri));
}
就只有这个方法了,从建页面
private void test(){
Uri uri = Uri.parse("http://www.csdn.net");
startActivity(new Intent(Intent.ACTION_VIEW,uri));
}
有的。好象是android.widget.webview