Code example for WebView

Methods: canGoBackcanGoForwardgoBackgoForward

0
			Integer size  = prediction.size(); 
			String name = prediction.get(0).name; 
			 
			if (size > 0) { 
				if (name.equals("left") && 
					webview.canGoBack()) { 
					webview.goBack(); 
				} else if (name.equals("right") && 
						   webview.canGoForward()) { 
					webview.goForward(); 
				} 
			} 
		} 
	}; 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present. 
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true; 
	}