Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetInitialScalesetScrollBarStylesetWebViewClient, setScrollbarFadingEnabled

0
		// TODO Auto-generated method stub 
			i = 0;
			super.onCreate(savedInstanceState);
			setContentView(R.layout.webview);
			wb = (WebView) findViewById(R.id.webView1);
			wb.getSettings().setJavaScriptEnabled(true);
			wb.getSettings().setBuiltInZoomControls(true);
			wb.setInitialScale(1);
			wb.getSettings().setLoadWithOverviewMode(true);
			wb.getSettings().setUseWideViewPort(true);
			wb.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
			wb.setScrollbarFadingEnabled(false);
			final AlertDialog alertDialog = new AlertDialog.Builder(this).create();
 
			progressBar = ProgressDialog.show(YDPWEBVIEW.this, "YDP page is ", "Loading...");
	 
			wb.loadUrl("https://yourdoctorprogram.com/qhr/Login.aspx/");
	 
 
	 wb.setWebViewClient(new WebViewClient() {
 
		   @Override 
		   public boolean shouldOverrideUrlLoading(WebView view, String urlNewString) {
		       if (!loadingFinished) {
		          redirect = true;
Experience pair programming with AI  Get Codota for Java