Пример #1
0
        Widget _buildNavigationBar()
        {
            return(new CustomAppBar(
                       () => {
                this._onClose = true;
                this.setState(() => { });
                if (Router.navigator.canPop())
                {
                    Router.navigator.pop();
                }

                if (!Application.isEditor)
                {
                    this._webViewObject.SetVisibility(false);
                    WebViewManager.destroyWebView();
                }
            },
                       rightWidget: new CustomButton(
                           onPressed: () => StoreProvider.store.dispatcher.dispatch(new OpenUrlAction {
                url = this.widget.url
            }),
                           child: new Icon(
                               icon: Icons.open_in_browser,
                               size: 24,
                               color: CColors.Icon
                               )
                           )
                       ));
        }
Пример #2
0
        public override void dispose()
        {
            if (this._timer != null)
            {
                this._timer.cancel();
                this._timer.Dispose();
            }

            if (!Application.isEditor)
            {
                this._webViewObject.SetVisibility(false);
                WebViewManager.destroyWebView();
                if (this.widget.landscape)
                {
                    Screen.orientation = ScreenOrientation.Portrait;
                }

                if (this.widget.fullScreen)
                {
                    Screen.fullScreen = false;
                }
            }

            Router.routeObserve.unsubscribe(this);

            base.dispose();
        }
Пример #3
0
        Widget _buildNavigationBar()
        {
            return(new CustomAppBar(
                       () => {
                this._onClose = true;
                this.setState(() => { });
                if (Router.navigator.canPop())
                {
                    Router.navigator.pop();
                }

                if (!Application.isEditor)
                {
                    this._webViewObject.SetVisibility(false);
                    WebViewManager.destroyWebView();
                }
            },
                       rightWidget: this.widget.showOpenInBrowser ?
                       (Widget) new CustomButton(
                           onPressed: () => StoreProvider.store.dispatcher.dispatch(new OpenUrlAction {
                url = this.widget.url
            }),
                           child: new Icon(
                               icon: Icons.open_in_browser,
                               size: 24,
                               color: CColors.Icon
                               )
                           )
                    : new Container(),
                       backgroundColor: this._progress == 1 && this.widget.fullScreen ? CColors.Black : null,
                       bottomSeparatorColor: this._progress == 1 && this.widget.fullScreen ? CColors.Black : null
                       ));
        }
Пример #4
0
 public void didPop()
 {
     if (!Application.isEditor)
     {
         this._webViewObject.SetVisibility(false);
         WebViewManager.destroyWebView();
     }
 }
Пример #5
0
        public override void dispose()
        {
            if (this._timer != null)
            {
                this._timer.cancel();
                this._timer.Dispose();
            }

            if (!Application.isEditor)
            {
                this._webViewObject.SetVisibility(false);
                WebViewManager.destroyWebView();
            }

            base.dispose();
        }
Пример #6
0
        Widget _buildNavigationBar()
        {
            return(new CustomAppBar(
                       () => {
                this._onClose = true;
                this.setState(() => { });
                if (Router.navigator.canPop())
                {
                    Router.navigator.pop();
                }

                if (!Application.isEditor)
                {
                    this._webViewObject.SetVisibility(false);
                    WebViewManager.destroyWebView();
                }
            }
                       ));
        }