void InternalReveal(bool revealed) { // make sure we're not doubly requesting the same thing. That would // cause a hitch in the animation. if (Revealed != revealed) { Revealed = revealed; // if we're currently animating, cancel the animation if (Animator != null) { Animator.Cancel( ); } int yOffset = revealed ? 0 : ButtonLayout.LayoutParameters.Height; // setup an animation from our current mask scale to the new one. Animator = ValueAnimator.OfInt((int)ButtonLayout.GetY( ), yOffset); Animator.AddUpdateListener(this); Animator.AddListener(new NavToolbarAnimationListener() { NavbarToolbar = this }); Animator.SetDuration((long)(PrivateSubNavToolbarConfig.SlideRate * 1000.0f)); Animator.Start( ); } }