Cdacians

Cdacians
Cdacians

Tuesday, 7 August 2012

android.webkit.WebView


android.webkit.WebView

android.webkit.WebView displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.

example:

android.webkit.WebView

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.AndroidWebView;
 
 
 
import android.app.Activity;
 
import android.os.Bundle;
 
import android.webkit.WebView;
 
 
 
public class AndroidWebViewActivity extends Activity {
 
  
 
 WebView webView;
 
 final String DEFAULT_URL = "http://android-coding.blogspot.com/?m=1";
 
  
 
   /** Called when the activity is first created. */
 
   @Override
 
   public void onCreate(Bundle savedInstanceState) {
 
       super.onCreate(savedInstanceState);
 
       setContentView(R.layout.main);
 
       webView = (WebView)findViewById(R.id.webview);
 
       webView.loadUrl(DEFAULT_URL);
 
       
 
   }
 
}

akm
wwww.cdacians.com

No comments:

Post a Comment