Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetWebChromeClientsetWebViewClient, setVisibility

0
        dialog.setMessage("�ε� ���Դϴ�...");
        dialog.setCancelable(false);
        dialog.show();
         
        mWebView=(WebView)findViewById(R.id.foodWebView);
        mWebView.getSettings().setBuiltInZoomControls(true);
		mWebView.setVisibility(View.INVISIBLE);
        mWebView.setWebViewClient(new goLibraryClient());  // WebViewClient ����
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.setWebChromeClient(new WebChromeClient(){
        	public void onProgressChanged(WebView view,int progress){
        		dialog.setProgress(progress);
        		 
        		if(progress==100){
        			mWebView.setVisibility(View.VISIBLE);
        	        dialog.dismiss();
        		}else{ 
        	        dialog.show();
        		} 
        	} 
        }); 
        mWebView.loadUrl(url);
    } 
	private class goLibraryClient extends WebViewClient{
        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