小智 2

xml:

  <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#ff00ff">
<WebView 
android:id="@+id/webView1"  
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

班级:

        wb=(WebView)findViewById(R.id.webView1);
        wb.loadUrl("http://ursite/");
        wb.setWebViewClient(new WebViewClient());

    }
}
Run Code Online (Sandbox Code Playgroud)