Ejemplo n.º 1
0
        private void AnimateIn(Android.Views.View view, double index, float translate = 100, string key = null)
        {
            if (_alreadyAnimated)
            {
                return;
            }

            if (key != null)
            {
                if (_alreadyAnimatedItems.Contains(key))
                {
                    return;
                }

                _alreadyAnimatedItems.Add(key);
            }

            if (_alreadyAnimated)
            {
                return;
            }

            view.Alpha        = 1f;
            view.TranslationY = translate;

            view.Animate()
            .TranslationYBy(translate)
            .Alpha(0)
            .SetDuration(300)
            .SetStartDelay((long)(33 * index))
            .SetInterpolator(new DecelerateInterpolator());
        }