Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetVerticalScrollbarOverlaysetWebChromeClientsetWebViewClient

0
    	  
    	strUrl = intent.getStringExtra("webViewUrl"); 
    	 
    	loadWaitDlg(this);
 
        browser.getSettings().setSupportZoom(true);
        browser.getSettings().setJavaScriptEnabled(true);
    	browser.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    	browser.getSettings().setLoadsImagesAutomatically(true);       
    	    	  
        browser.setVerticalScrollbarOverlay(true);
        browser.getSettings().setSavePassword(true);
        browser.getSettings().setAppCacheEnabled(true); 
        browser.getSettings().setPluginsEnabled(true);
        browser.getSettings().setSupportMultipleWindows (true);
  
    	browser.loadUrl(strUrl);
    	browser.setWebChromeClient(new WebChromeClient() {
    		   public void onProgressChanged(WebView view, int progress) {
    		     // Activities and WebViews measure progress with different scales. 
    		     // The progress meter will automatically disappear when we reach 100% 
    		     activity.setProgress(progress * 100);
    		   } 
    		 }); 
        browser.setWebViewClient(new AppClient());   
//    	browser.setInitialScale(50); 
    } 
     
    public static void loadWaitDlg(Context con) {
		if(pDlg == null)