Code example for WebView

Methods: addJavascriptInterfacegetSettingssetScrollBarStyle

0
 
	/** Sets up the WebView object and loads the URL of the page **/ 
	private void setupWebView() { 
 
		final WebView webview = getWebView();
		webview.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
		setWebViewClient(new MapWebViewClient(getActivity()));
		loadUrl(mUri.toString());
 
		final WebSettings settings = webview.getSettings();
		settings.setBuiltInZoomControls(false);
 
		/** Allows JavaScript calls to access application resources **/ 
		webview.addJavascriptInterface(new JavaScriptInterface(), "android");
 
	} 
 
	/** 
	 * Sets up the interface for getting access to Latitude and Longitude data 
	 * from device 
	 **/