Esempio n. 1
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(false);
            this._refreshController = new RefreshController();
            this._isHaveTitle       = false;
            this._titleHeight       = 0.0f;
            this._controller        = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, navBarHeight, 0, 0),
                RelativeRect.fromLTRB(0, 13, 0, 0)
                );

            this._animation = rectTween.animate(this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchArticleDetail();
                this.widget.actionModel.fetchArticleDetail(arg: this.widget.viewModel.articleId);
            });
            this._loginSubId = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
                this.widget.actionModel.startFetchArticleDetail();
                this.widget.actionModel.fetchArticleDetail(arg: this.widget.viewModel.articleId);
            });
            this._jumpState             = _ArticleJumpToCommentState.Inactive;
            this._cachedCommentPosition = null;
            this._needRebuildWithCachedCommentPosition = false;
        }
Esempio n. 2
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(false);
            this._favoriteInfoHeight    = 0;
            this._favoriteArticleOffset = 0;
            this._isHaveTitle           = false;
            this._controller            = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, 44, 0, 0),
                RelativeRect.fromLTRB(0, 13, 0, 0)
                );

            this._animation = rectTween.animate(parent: this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchFavoriteDetail();
                this.widget.actionModel.fetchFavoriteDetail(arg1: this.widget.viewModel.tagId, 0);
            });
            WidgetsBinding.instance.addPostFrameCallback(_ => {
                var renderBox        = (RenderBox)this._favoriteInfoKey.currentContext.findRenderObject();
                var favoriteInfoSize = renderBox.size;
                if (this._favoriteInfoHeight != favoriteInfoSize.height)
                {
                    this.setState(() => this._favoriteInfoHeight = favoriteInfoSize.height);
                }
            });
        }
Esempio n. 3
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(true);
            this._articlePageNumber     = 1;
            this._favoriteArticleOffset = 0;
            this._refreshController     = new RefreshController();
            this._isHaveTitle           = false;
            this._hideNavBar            = true;
            this._isShowTop             = false;
            this._selectedIndex         = 0;
            this._controller            = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, top: navBarHeight, 0, 0),
                RelativeRect.fromLTRB(0, 0, 0, 0)
                );

            this._animation = rectTween.animate(parent: this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchUserProfile();
                this.widget.actionModel.fetchUserProfile();
                this.widget.actionModel.startFetchUserArticle();
                this.widget.actionModel.startFetchUserFavorite();
            });
        }
Esempio n. 4
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._selectedIndex  = 1;
     this._pageController = new PageController(initialPage: this._selectedIndex);
     this._titleFontSize  = _maxTitleFontSize;
     this._navBarHeight   = _maxNavBarHeight;
     this._loginSubId     = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
         if (this._selectedIndex != 1)
         {
             this._selectedIndex = 1;
             this._pageController.animateToPage(
                 page: this._selectedIndex,
                 TimeSpan.FromMilliseconds(250),
                 curve: Curves.ease
                 );
         }
     });
     this._logoutSubId = EventBus.subscribe(sName: EventBusConstant.logout_success, args => {
         if (this._selectedIndex != 1)
         {
             this._selectedIndex = 1;
             this._pageController.animateToPage(
                 page: this._selectedIndex,
                 TimeSpan.FromMilliseconds(250),
                 curve: Curves.ease
                 );
         }
     });
 }
Esempio n. 5
0
 public override Widget build(BuildContext context)
 {
     StatusBarManager.statusBarStyle(false);
     return(new Container(
                color: CColors.White,
                child: new CustomSafeArea(
                    bottom: false,
                    child: new Container(
                        color: CColors.Background,
                        child: new Column(
                            children: new List <Widget> {
         this._buildNavigationBar(),
         new Expanded(
             child: new CustomSegmentedControl(
                 new List <object> {
             "我创建的", "我关注的"
         },
                 new List <Widget> {
             new MyCreateFavoriteScreenConnector(),
             new MyFollowFavoriteScreenConnector()
         }
                 )
             )
     }
                            )
                        )
                    )
                ));
 }
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(true);
            this._showNavBarShadow = true;
            this._isHaveTitle      = false;
            this._titleHeight      = 0.0f;
            this._aspectRatio      = 16.0f / 9;
            if (Application.platform != RuntimePlatform.Android)
            {
                this._aspectRatio = 3f / 2;
            }

            this._controller = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, 44, 0, 0),
                RelativeRect.fromLTRB(0, 13, 0, 0)
                );

            this._animation = rectTween.animate(this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchEventDetail();
                this.widget.actionModel.fetchEventDetail(this.widget.viewModel.eventId, EventType.offline);
            });
            this._loginSubId = EventBus.subscribe(EventBusConstant.login_success, args => {
                this.widget.actionModel.startFetchEventDetail();
                this.widget.actionModel.fetchEventDetail(this.widget.viewModel.eventId, EventType.offline);
            });
        }
Esempio n. 7
0
 public void didPopNext()
 {
     if (this.widget.viewModel.currentTabBarIndex == 1)
     {
         StatusBarManager.statusBarStyle(false);
     }
 }
Esempio n. 8
0
        bool _onNotification(ScrollNotification notification)
        {
            var axisDirection = notification.metrics.axisDirection;

            if (axisDirection == AxisDirection.left || axisDirection == AxisDirection.right)
            {
                return(true);
            }

            var pixels = notification.metrics.pixels;

            if (pixels >= 3)
            {
                if (this._isHaveTitle)
                {
                    StatusBarManager.statusBarStyle(false);
                    this.setState(() => this._isHaveTitle = false);
                }
            }
            else
            {
                if (!this._isHaveTitle)
                {
                    StatusBarManager.statusBarStyle(true);
                    this.setState(() => this._isHaveTitle = true);
                }
            }

            return(true);
        }
Esempio n. 9
0
 public void didPopNext()
 {
     if (this.widget.viewModel.currentTabBarIndex == 3)
     {
         StatusBarManager.statusBarStyle(UserInfoManager.isLogin());
     }
 }
Esempio n. 10
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(true);
            this._articleOffset     = 0;
            this._refreshController = new RefreshController();
            this._isHaveTitle       = false;
            this._hideNavBar        = true;
            this._controller        = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, 44, 0, 0),
                RelativeRect.fromLTRB(0, 0, 0, 0)
                );

            this._animation = rectTween.animate(this._controller);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                this.widget.actionModel.startFetchTeam();
                this.widget.actionModel.fetchTeam();
                this.widget.actionModel.startFetchTeamArticle();
                this.widget.actionModel.fetchTeamArticle(0);
            });
        }
Esempio n. 11
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._selectedIndex          = 1;
     this._tabController          = new CustomTabController(2, this, initialIndex: this._selectedIndex);
     this._navBarHeight           = CustomAppBarUtil.appBarHeight;
     this._isRefresh              = false;
     this._recommendArticlePixels = 0;
     this._followArticlePixels    = 0;
     this._loginSubId             = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
         if (this._selectedIndex != 1)
         {
             this._selectedIndex = 1;
             this._tabController.animateTo(value: this._selectedIndex);
         }
     });
     this._logoutSubId = EventBus.subscribe(sName: EventBusConstant.logout_success, args => {
         if (this._selectedIndex != 1)
         {
             this._selectedIndex = 1;
             this._tabController.animateTo(value: this._selectedIndex);
         }
     });
 }
Esempio n. 12
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._selectedIndex  = 1;
     this._pageController = new PageController(initialPage: this._selectedIndex);
     this._titleFontSize  = _maxTitleFontSize;
     this._navBarHeight   = _maxNavBarHeight;
     StatusBarManager.hideStatusBar(false);
     SplashManager.fetchSplash();
     AnalyticsManager.AnalyticsOpenApp();
     SchedulerBinding.instance.addPostFrameCallback(_ => { this.widget.actionModel.fetchReviewUrl(); });
     this._loginSubId = EventBus.subscribe(sName: EventBusConstant.login_success, args => {
         if (this._selectedIndex != 1)
         {
             this._selectedIndex = 1;
             this._pageController.animateToPage(
                 page: this._selectedIndex,
                 TimeSpan.FromMilliseconds(250),
                 curve: Curves.ease
                 );
         }
     });
     this._logoutSubId = EventBus.subscribe(sName: EventBusConstant.logout_success, args => {
         if (this._selectedIndex != 1)
         {
             this._selectedIndex = 1;
             this._pageController.animateToPage(
                 page: this._selectedIndex,
                 TimeSpan.FromMilliseconds(250),
                 curve: Curves.ease
                 );
         }
     });
 }
Esempio n. 13
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(true);
            this._showNavBarShadow   = true;
            this._isHaveTitle        = false;
            this._titlePosition      = 0.0f;
            this._playButtonPosition = 0.0f;
            this._aspectRatio        = 16.0f / 9;
            if (CCommonUtils.isAndroid)
            {
                this._aspectRatio = 3f / 2;
            }

            this._controller = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            var rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, 44, 0, 0),
                RelativeRect.fromLTRB(0, 0, 0, 0)
                );

            this._animation = rectTween.animate(this._controller);
            // SchedulerBinding.instance.addPostFrameCallback(_ => {
            //     this.widget.actionModel.startFetchGameDetail();
            //     this.widget.actionModel.fetchGameDetail();
            // });
        }
Esempio n. 14
0
 public override void dispose()
 {
     StatusBarManager.statusBarStyle(false);
     EventBus.unSubscribe(EventBusConstant.login_success, this._loginSubId);
     Router.routeObserve.unsubscribe(this);
     base.dispose();
 }
Esempio n. 15
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(false);
            var user = this.widget.viewModel.user;

            this._fullNameController = new TextEditingController(text: user.fullName);
            this._titleController    = new TextEditingController(text: user.title);

            var jobRole = Resources.Load <TextAsset>("files/JobRole").text;

            this._jobRole = JsonConvert.DeserializeObject <Dictionary <string, string> >(value: jobRole);

            SchedulerBinding.instance.addPostFrameCallback(_ => {
                if (this.widget.viewModel.fullName.Length > 0 ||
                    this.widget.viewModel.title.Length > 0 ||
                    this.widget.viewModel.jobRole != null)
                {
                    this.widget.actionModel.cleanPersonalInfo();
                }

                this.widget.actionModel.changeFullName(obj: user.fullName);
                this.widget.actionModel.changeTitle(obj: user.title);
                var jobRoleIds = user.jobRoleIds ?? new List <string>();
                var jobRoleMap = user.jobRoleMap ?? new Dictionary <string, JobRole>();
                jobRoleIds.ForEach(jobRoleId => {
                    if (jobRoleMap.ContainsKey(key: jobRoleId))
                    {
                        var jonRole = jobRoleMap[key: jobRoleId];
                        this.widget.actionModel.changeJobRole(obj: jonRole);
                    }
                });
            });
        }
 public void didPopNext()
 {
     StatusBarManager.statusBarStyle(false);
     if (this._showPlayer)
     {
         AVPlayerPlugin.showPlayer();
     }
 }
Esempio n. 17
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     // SchedulerBinding.instance.addPostFrameCallback(_ => {
     //     this.widget.actionModel.startFetchGameDetail();
     //     this.widget.actionModel.fetchGameDetail();
     // });
 }
Esempio n. 18
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(UserInfoManager.isLogin());
     this._loginSubId = EventBus.subscribe(sName: EventBusConstant.login_success,
                                           _ => { StatusBarManager.statusBarStyle(true); });
     this._logoutSubId = EventBus.subscribe(sName: EventBusConstant.logout_success,
                                            _ => { StatusBarManager.statusBarStyle(false); });
 }
        public void didPopNext()
        {
            if (this.widget.viewModel.eventId.isNotEmpty())
            {
                CTemporaryValue.currentPageModelId = this.widget.viewModel.eventId;
            }

            StatusBarManager.statusBarStyle(isLight: this._showNavBarShadow);
        }
Esempio n. 20
0
 public override void initState() {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._refreshController = new RefreshController();
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchGame();
         this.widget.actionModel.fetchGame(arg: firstPageNumber);
     });
 }
Esempio n. 21
0
        bool _onNotification(ScrollNotification notification)
        {
            var pixels = notification.metrics.pixels;
            var navBarBottomPosition = navBarHeight + CCommonUtils.getSafeAreaTopPadding(context: this.context);

            if (pixels >= navBarBottomPosition)
            {
                if (this._hideNavBar)
                {
                    this.setState(() => this._hideNavBar = false);
                    StatusBarManager.statusBarStyle(false);
                }
            }
            else
            {
                if (!this._hideNavBar)
                {
                    this.setState(() => this._hideNavBar = true);
                    StatusBarManager.statusBarStyle(true);
                }
            }

            if (pixels > imageBaseHeight - navBarHeight - 24)
            {
                if (!this._isHaveTitle)
                {
                    this._controller.forward();
                    this.setState(() => this._isHaveTitle = true);
                }
            }
            else
            {
                if (this._isHaveTitle)
                {
                    this._controller.reverse();
                    this.setState(() => this._isHaveTitle = false);
                }
            }

            if (pixels > imageBaseHeight - navBarHeight)
            {
                if (!this._isShowTop)
                {
                    this.setState(() => this._isShowTop = true);
                }
            }
            else
            {
                if (this._isShowTop)
                {
                    this.setState(() => this._isShowTop = false);
                }
            }

            return(true);
        }
Esempio n. 22
0
 static void _handleMethodCall(string method, List <JSONNode> args)
 {
     if (context != null)
     {
         using (WindowProvider.of(context: context).getScope()) {
             switch (method)
             {
             case "OnReceiveQRCode": {
                 string qrCode = args[0];
                 if (qrCode.StartsWith("http://") || qrCode.StartsWith("https://"))
                 {
                     var uri = new Uri(uriString: qrCode);
                     if (uri.AbsoluteUri.StartsWith("https://connect"))
                     {
                         var token = HttpUtility.ParseQueryString(query: uri.Query).Get("token");
                         if (token.isNotEmpty())
                         {
                             var isLoggedIn = StoreProvider.store.getState().loginState.isLoggedIn;
                             if (isLoggedIn)
                             {
                                 LoginApi.LoginByQr(token: token, "check");
                                 StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToQRScanLoginAction {
                                         token = token
                                     });
                             }
                             else
                             {
                                 qrCodeToken = token;
                                 StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToAction {
                                         routeName = MainNavigatorRoutes.Login
                                     });
                             }
                         }
                         else
                         {
                             StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToWebViewAction {
                                     url = qrCode
                                 });
                         }
                     }
                     else
                     {
                         StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToWebViewAction {
                                 url = qrCode
                             });
                     }
                 }
                 StatusBarManager.hideStatusBar(false);
                 StatusBarManager.statusBarStyle(false);
                 removeListener();
             }
             break;
             }
         }
     }
 }
Esempio n. 23
0
        bool _onNotification(BuildContext context, ScrollNotification notification)
        {
            var axisDirection = notification.metrics.axisDirection;

            if (axisDirection == AxisDirection.left || axisDirection == AxisDirection.right)
            {
                return(true);
            }

            var pixels     = notification.metrics.pixels;
            var topPadding = 44 + CCommonUtils.getSafeAreaTopPadding(context: context);

            if (this._playButtonPosition == 0.0f)
            {
                var width       = MediaQuery.of(context).size.width;
                var imageHeight = width / this._aspectRatio;
                this._playButtonPosition = imageHeight + gameBriefKey.currentContext.size.height - topPadding - 24 - 6;
                // topPadding 是顶部的高度, 24 是底部的 padding, 6 是按钮到左边图片到底部的距离
            }

            if (pixels >= 44 + topPadding)
            {
                if (this._showNavBarShadow)
                {
                    this.setState(() => { this._showNavBarShadow = false; });
                    StatusBarManager.statusBarStyle(false);
                }
            }
            else
            {
                if (!this._showNavBarShadow)
                {
                    this.setState(() => { this._showNavBarShadow = true; });
                    StatusBarManager.statusBarStyle(true);
                }
            }

            if (pixels > this._playButtonPosition)
            {
                if (!this._isHaveTitle)
                {
                    this._controller.forward();
                    this.setState(() => { this._isHaveTitle = true; });
                }
            }
            else
            {
                if (this._isHaveTitle)
                {
                    this._controller.reverse();
                    this.setState(() => { this._isHaveTitle = false; });
                }
            }

            return(true);
        }
Esempio n. 24
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._favoriteOffset = 0;
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchMyFavorite();
         this.widget.actionModel.fetchMyFavorite(0);
     });
 }
Esempio n. 25
0
        bool _onNotification(ScrollNotification notification)
        {
            var pixels = notification.metrics.pixels;

            if (pixels >= 44 + this._topPadding)
            {
                if (this._hideNavBar)
                {
                    this.setState(() => this._hideNavBar = false);
                    StatusBarManager.statusBarStyle(false);
                }
            }
            else
            {
                if (!this._hideNavBar)
                {
                    this.setState(() => this._hideNavBar = true);
                    StatusBarManager.statusBarStyle(true);
                }
            }

            if (pixels > headerHeight - 24 - (44 + this._topPadding))
            {
                if (!this._isHaveTitle)
                {
                    this._controller.forward();
                    this.setState(() => this._isHaveTitle = true);
                }
            }
            else
            {
                if (this._isHaveTitle)
                {
                    this._controller.reverse();
                    this.setState(() => this._isHaveTitle = false);
                }
            }

            if (pixels > headerHeight - (44 + this._topPadding))
            {
                if (!this._isShowTop)
                {
                    this.setState(() => this._isShowTop = true);
                }
            }
            else
            {
                if (this._isShowTop)
                {
                    this.setState(() => this._isShowTop = false);
                }
            }

            return(true);
        }
Esempio n. 26
0
        static void _handleMethodCall(string method, List <JSONNode> args)
        {
            if (GlobalContext.context != null)
            {
                using (WindowProvider.of(context: GlobalContext.context).getScope()) {
                    switch (method)
                    {
                    case "OnReceiveQRCode": {
                        string qrCode = args[0];
                        if (qrCode.StartsWith("http://") || qrCode.StartsWith("https://"))
                        {
                            var uri = new Uri(uriString: qrCode);
                            if (uri.AbsoluteUri.StartsWith("https://connect"))
                            {
                                var token = HttpUtility.ParseQueryString(query: uri.Query).Get("token");
                                if (token.isNotEmpty())
                                {
                                    var isLoggedIn = StoreProvider.store.getState().loginState.isLoggedIn;
                                    if (isLoggedIn)
                                    {
                                        checkToken(token: token);
                                    }
                                    else
                                    {
                                        qrCodeToken = token;
                                        StoreProvider.store.dispatcher.dispatch(new MainNavigatorPushToAction {
                                                routeName = MainNavigatorRoutes.Login
                                            });
                                    }
                                }
                                else
                                {
                                    CustomDialogUtils.showToast("暂不支持该二维码类型", Icons.sentiment_dissatisfied);
                                }
                            }
                            else
                            {
                                CustomDialogUtils.showToast("暂不支持该二维码类型", Icons.sentiment_dissatisfied);
                            }
                        }
                        else if (!qrCode.Equals("pop"))
                        {
                            CustomDialogUtils.showToast("暂不支持该二维码类型", Icons.sentiment_dissatisfied);
                        }

                        StatusBarManager.hideStatusBar(false);
                        StatusBarManager.statusBarStyle(isLight: StoreProvider.store.getState().loginState
                                                        .isLoggedIn);
                        removeListener();
                    }
                    break;
                    }
                }
            }
        }
Esempio n. 27
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(false);
            this._scrollController    = new ScrollController();
            this._contentFocusNodeKey = GlobalKey.key("_contentFocusNodeKey");
            this._nameFocusNodeKey    = GlobalKey.key("_nameFocusNodeKey");
            this._contactFocusNodeKey = GlobalKey.key("_contactFocusNodeKey");

            this._contentFocusNode.addListener(this._contentFocusNodeListener);
            this._nameFocusNode.addListener(this._nameFocusNodeListener);
            this._contactFocusNode.addListener(this._contactFocusNodeListener);
        }
        public void didPopNext()
        {
            if (this.widget.viewModel.eventId.isNotEmpty())
            {
                CTemporaryValue.currentPageModelId = this.widget.viewModel.eventId;
            }

            StatusBarManager.statusBarStyle(false);
            if (this._showPlayer)
            {
                AVPlayerPlugin.showPlayer();
            }
        }
Esempio n. 29
0
 public override void initState()
 {
     base.initState();
     StatusBarManager.statusBarStyle(false);
     this._userOffset        = 0;
     this._refreshController = new RefreshController();
     this._title             = this.widget.viewModel.currentUserId == this.widget.viewModel.userId
         ? "我的粉丝"
         : "全部粉丝";
     SchedulerBinding.instance.addPostFrameCallback(_ => {
         this.widget.actionModel.startFetchFollower();
         this.widget.actionModel.fetchFollower(0);
     });
 }
        bool _onNotification(BuildContext context, ScrollNotification notification)
        {
            var pixels     = notification.metrics.pixels;
            var topPadding = 44 + CCommonUtils.getSafeAreaTopPadding(context: context);

            if (this._titleHeight == 0.0f)
            {
                var width       = MediaQuery.of(context).size.width;
                var imageHeight = width / this._aspectRatio;
                this._titleHeight = imageHeight + eventTitleKey.currentContext.size.height - topPadding +
                                    16; // topPadding 是顶部的高度 16 是文字与图片的间隙
            }

            if (pixels >= 44 + topPadding)
            {
                if (this._showNavBarShadow)
                {
                    this.setState(() => { this._showNavBarShadow = false; });
                    StatusBarManager.statusBarStyle(false);
                }
            }
            else
            {
                if (!this._showNavBarShadow)
                {
                    this.setState(() => { this._showNavBarShadow = true; });
                    StatusBarManager.statusBarStyle(true);
                }
            }

            if (pixels > this._titleHeight)
            {
                if (!this._isHaveTitle)
                {
                    this._controller.forward();
                    this.setState(() => { this._isHaveTitle = true; });
                }
            }
            else
            {
                if (this._isHaveTitle)
                {
                    this._controller.reverse();
                    this.setState(() => { this._isHaveTitle = false; });
                }
            }

            return(true);
        }