Android应用程序中嵌入浏览器,用WebView控件来显示百度首页面,在当前页浏览网页。
1.首先修改activity_main.xml文件添加WebView控件,这里我用的是线性布局LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<WebView
android:layout_width=