Code example for Fragment

Methods: onActivityCreated

0
    return(inflater.inflate(R.layout.content_fragment, container, false));
  } 
   
  @Override 
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
     
    WebView browser=getBrowser();
     
    browser.setWebViewClient(new RedirectFixer());
    browser.getSettings().setJavaScriptEnabled(true);
     
    if (savedInstanceState!=null) {
      browser.restoreState(savedInstanceState);
    } 
    else if (urlToLoad!=null) {
      loadUrl(urlToLoad);
    } 
  } 
   
  @Override