/// <param name="viewToParallax"> </param> /// <param name="velocityParallax"> /// the velocity to apply to the view in order to show the parallax effect. choose a velocity between 0 and 1 for /// better results /// @return /// </param> public virtual AnimatorBuilder ApplyVerticalParallax(View viewToParallax, float velocityParallax) { if (viewToParallax == null) { throw new ArgumentNullException("viewToParallax"); } listAnimatorBundles.Add(AnimatorBundle.Create(AnimatorBundle.TypeAnimation.Parallax, viewToParallax, null, 0f, -velocityParallax)); return(this); }
public virtual AnimatorBuilder ApplyFade(View viewToFade, float fade, IInterpolator interpolator) { if (viewToFade == null) { throw new ArgumentNullException("viewToFade"); } float startAlpha = viewToFade.Alpha; listAnimatorBundles.Add(AnimatorBundle.Create(AnimatorBundle.TypeAnimation.Fade, viewToFade, interpolator, startAlpha, fade)); return(this); }
public virtual AnimatorBuilder ApplyTranslation(View view, float translateX, float translateY, IInterpolator interpolator) { if (view == null) { throw new ArgumentNullException("view"); } AnimatorBundle animatorTranslationX = AnimatorBundle.Create(AnimatorBundle.TypeAnimation.TranslationX, view, interpolator, view.TranslationX, translateX); AnimatorBundle animatorTranslationY = AnimatorBundle.Create(AnimatorBundle.TypeAnimation.TranslationY, view, interpolator, view.TranslationY, translateY); AdjustTranslation(view); listAnimatorBundles.Add(animatorTranslationX); listAnimatorBundles.Add(animatorTranslationY); return(this); }