Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetWebChromeClientsetWebViewClient, requestFocus

0
		md5.append("fy602");
		temp = "ggid=" +  user_no + "&checkcode=" + SystemUtil.toMd5(md5.toString()).toUpperCase();
		 
		URL2 = URL2 + temp;
		browser = (WebView)findViewById(R.id.webkit);
		browser.getSettings().setJavaScriptEnabled(true);
		browser.getSettings().setSupportZoom(true);
		browser.getSettings().setBuiltInZoomControls(true);
		browser.loadUrl(URL2);
		browser.requestFocus();
		 
		browser.setWebChromeClient(new WebChromeClient() {
			@Override 
			public void onProgressChanged(WebView view, int newProgress) {
				// ��д����������Activity�Ľ����� 
				CallListActivity.this.setProgress(newProgress * 100);
			} 
		}); 
		 
		browser.setWebViewClient(new WebViewClient() {
			@Override 
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				view.loadUrl(url);
				return true;  
			} 
Stop searching for code, let great code find you!  Add Codota to your java IDE