Code example for Fragment

Methods: onSaveInstanceState

0
    } 
  } 
   
  @Override 
  public void onSaveInstanceState(Bundle state) {
    super.onSaveInstanceState(state);
     
    WebView browser=getBrowser();
     
    if (browser!=null) {
      browser.saveState(state);
    } 
  } 
   
  public void loadUrl(String url) {
    getBrowser().loadUrl(url);
  } 
   
  private WebView getBrowser() {
    return((WebView)(getView().findViewById(R.id.browser)));