/// <summary>
 /// Shows the current notification.
 /// </summary>
 private void ShowCurrentNotification()
 {
     UIView.AnimateNotify(Crex.Application.Current.Config.AnimationTime.Value / 1000.0f, () =>
     {
         View.Frame = new CGRect(0, 0, View.Frame.Size.Width, View.Frame.Size.Height);
     }, ( bool finished ) =>
     {
         NotificationWasShown?.Invoke(this, new EventArgs());
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// Shows the current notification.
        /// </summary>
        private void ShowCurrentNotification()
        {
            var animation = ObjectAnimator.OfFloat(ContainerView, "translationY", Utility.DipToPixel(0));

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

            ContainerView.ClearAnimation();
            ContainerView.TranslationY = Utility.DipToPixel(-120);
            ContainerView.Visibility   = ViewStates.Visible;
            DismissButton.Focusable    = true;

            animation.Start();
        }