/// <summary>
 /// Hides the current notification.
 /// </summary>
 private void HideCurrentNotification()
 {
     UIView.AnimateNotify(Crex.Application.Current.Config.AnimationTime.Value / 1000.0f, () =>
     {
         View.Frame = new CGRect(0, -View.Frame.Size.Height, View.Frame.Size.Width, View.Frame.Size.Height);
     }, ( bool completed ) =>
     {
         NotificationWasDismissed?.Invoke(this, new EventArgs());
     });
 }
示例#2
0
        /// <summary>
        /// Hides the current notification.
        /// </summary>
        private void HideCurrentNotification()
        {
            var animation = ObjectAnimator.OfFloat(ContainerView, "translationY", Utility.DipToPixel(-120));

            animation.SetDuration(Crex.Application.Current.Config.AnimationTime.Value);
            animation.AnimationEnd += (sender, args) =>
            {
                ContainerView.Visibility = ViewStates.Invisible;
                NotificationWasDismissed?.Invoke(this, new EventArgs());
            };

            ContainerView.ClearAnimation();
            DismissButton.ClearFocus();
            DismissButton.Focusable = false;

            animation.Start();
        }