Code example for WebView: Displaying web pages

Methods: canGoBackgetSettingsloadUrlsetWebViewClient

0
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		 
		setContentView(R.layout.isfwebview);
		browser=(WebView) findViewById(R.id.isfwebview);
		browser.setWebViewClient(new isfWebViewClient());
		browser.canGoBack();
		browser.getSettings().setJavaScriptEnabled(true);
		browser.loadUrl("http://www.ilesansfil.org/blogue/");
	} 
	 
    @Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK) && browser.canGoBack()) {
            browser.goBack();
            return true; 
        } 
        return super.onKeyDown(keyCode, event);
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE