Code example for WebView

Methods: clearCacheclearHistorydestroy, setVisibility

0
	@Override 
	protected void onDestroy() { 
		super.onDestroy(); 
 
		if (webViewer != null) {
			webViewer.setVisibility(View.GONE);
		    webViewer.clearCache(true);
		    webViewer.clearHistory();
		    webViewer.destroy();
		} 
	} 
 
	@Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ECLAIR
            && keyCode == KeyEvent.KEYCODE_BACK
            && event.getRepeatCount() == 0) {
            // Take care of calling this method on earlier versions of 
            // the platform where it doesn't exist. 
            onBackPressed(); 
        }