Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetWebChromeClientsetWebViewClient

0
		setContentView(R.layout.browser);
 
//		mPar = (ProgressBar) findViewById(R.id.pbar); 
 
		mWebView = (WebView) findViewById(R.id.rssminer);
		mWebView.getSettings().setJavaScriptEnabled(true);
		mWebView.setWebViewClient(new WebViewClient());
		mWebView.setWebChromeClient(new WebChromeClient() {
			public void onProgressChanged(WebView view, final int progress) {
//				mPar.setProgress(progress); 
//				if (progress == 100) { 
//					mPar.setVisibility(View.INVISIBLE); 
//				} else if (mPar.getVisibility() == View.INVISIBLE) { 
//					mPar.setVisibility(ProgressBar.VISIBLE); 
//				} 
				// on the main thread 
			} 
		}); 
 
		mWebView.loadUrl(Constants.SERVER);
	} 
 
	public void onBackPressed() { 
		if (mWebView.canGoBack()) {
			isWarmed = false;
Stop searching for code, let great code find you!  Add Codota to your java IDE