Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetInitialScalesetWebChromeClientsetWebViewClient

0
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
 
		webView = (WebView) findViewById(R.id.wv1);
		// webView.setWebViewClient(new WebViewClient()); 
		webView.getSettings().setSupportZoom(true);
		webView.getSettings().setUseWideViewPort(true);
		webView.getSettings().setJavaScriptEnabled(true);
		webView.setInitialScale(1);
		webView.loadUrl("http://ipad.csair.com");
 
		// webView.requestFocus(); 
		// wv.setScrollBarStyle(SCROLLBARS_OUTSIDE_OVERLAY); 
 
		// ����������activity�ı��⣬Ҳ���Ը����Լ���������һЩ�����IJ��� 
		webView.setWebChromeClient(new WebChromeClient() {
			@Override 
			public void onProgressChanged(WebView view, int newProgress) {
				if (newProgress == 100) {
					// title.setText("��������"); 
				} else { 
					// title.setText("������......."); 
				} 
			} 
		}); 
 
		webView.setWebViewClient(new WebViewClient() {
 
			// ��д�˷�������������ҳ���������ӻ����ڵ�ǰ��webview����ת���������������DZ� 
			@Override 
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				view.loadUrl(url);
Connect your IDE to all the code out there  Get Codota for Java