/** * Called when the fragment is no longer in use. Destroys the internal state of the WebView. */ // @Override public override void OnDestroy() { if (mWebView != null) { mWebView.Destroy(); mWebView = null; } base.OnDestroy(); }
/** * Called to instantiate the view. Creates and returns the WebView. */ public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (mWebView != null) { mWebView.Destroy(); } View contentView = inflater.Inflate(getLayoutId(), container, false); mWebView = (YouzanBrowser)contentView.FindViewById(getWebViewId()); mIsWebViewAvailable = true; return(contentView); }