Code example for WebView: Displaying web pages

Methods: loadUrlsetWebViewClient, requestFocus, setFocusable, setFocusableInTouchMode

0
 
	        wv = (WebView) findViewById(R.id.web);
	         
	        scroller = (ScrollView) findViewById(R.id.scroller);
	         
	        wv.setWebViewClient(new WebViewClient() {  	
	        	 
	            public void onPageFinished (WebView view, String url) {
	             scroller.scrollTo(0, 0);
	        } 
	        }); 
	         
	        if (wv != null) {
	        	 
	        	        	 
	            wv.loadUrl("file:///android_asset/documentation/main.html");
	            wv.setFocusable(true);
	            wv.setFocusableInTouchMode(true);
	            wv.requestFocus();
	        } 
 
	        boolean hideControls = false;
	        Intent i = getIntent();
	        if (i != null) {
Stop searching for code, let great code find you!  Add Codota to your java IDE