Exemple #1
0
            public void OnAnimationUpdate(ValueAnimator animation)
            {
                int xPos = ((Java.Lang.Integer)animation.GetAnimatedValue("")).IntValue();

                CardValueAnimator cardAnimator = animation as CardValueAnimator;

                cardAnimator.Card.SetX(xPos);
            }
Exemple #2
0
            /// <summary>
            /// Animates a card from startPos to endPos over time
            /// </summary>
            protected override void AnimateCard(object platformObject, string animName, PointF startPos, PointF endPos, float duration, PlatformCardCarousel parentDelegate)
            {
                // setup an animation from our current mask scale to the new one.
                CardValueAnimator animator = new CardValueAnimator();

                animator.SetIntValues((int)startPos.X, (int)endPos.X);

                CarouselAnimationListener listener = new CarouselAnimationListener( )
                {
                    Parent = this
                };

                animator.AddUpdateListener(listener);
                animator.AddListener(listener);
                animator.SetDuration(500);
                animator.Card = platformObject as View;

                animator.Start();

                ActiveAnimators.Add(animator);
            }