You can use WebView to add a WEB application to the client application. The WebView class is an extension of the View in Android. You can use it in the layout file of the Activity. It does not include any WEB browser development features, such as local control or address bar. WebView displays a WEB page by default.
The most common way to use WebView is to display information in the application, which is changed. Like a user agreement or help manual. In your application, you can create an Activity that contains WebView and use it to display an online document.
In another case, your application always obtains data from the network. For example, Email. In this case, it is more convenient to use WebView to load webpages.
Add a WebView to your application:
<? Xml version = "1.0" encoding = "UTF-8"?>
<WebView xmlns: android = "http://schemas.android.com/apk/res/android"
Android: id = "@ + id/webview"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
/>
Load a page through LoadedUrl:
WebView myWebView = (WebView) findViewById (R. id. webview );
MyWebView. loadUrl (http://www.bkjia.com /);
Before that, you should write the following code in Mainifest to ensure Internet connection:
<Manifest...>
<Uses-permission android: name = "android. permission. INTERNET"/>
...
</Manifest>
From Yanyun's column