/** * @param spring * the underlying {@link com.facebook.rebound.Spring}. * @param trackStrategy * the tracking behavior * @param followStrategy * the follow behavior * @param restValue * the rest value * @param property * the event fields to imitate and the view property to animate. * @param springListener * a spring listener to attach to the spring * @return this builder for chaining */ public Builder AddMotion(Spring spring, int trackStrategy, int followStrategy, int restValue, MotionProperty property, ISpringListener springListener) { mMotions.Add(CreateMotionFromProperties(spring, new MotionProperty[] { property }, new ISpringListener[] { springListener }, trackStrategy, followStrategy, restValue)); return(this); }
/** * @param motionImitator * maps an event to a {@link com.facebook.rebound.Spring} * @param viewProperty * the {@link android.view.View} property to animate * @param springListener * additional listener to attach * @return the builder for chaining */ public Builder AddMotion(MotionImitator motionImitator, Android.Util.Property viewProperty, ISpringListener springListener) { return(AddMotion(mSpringSystem.CreateSpring(), motionImitator, new Performer[] { new Performer(viewProperty) }, new ISpringListener[] { springListener })); }
/** * Uses the default {@link com.facebook.rebound.SpringConfig} to animate the view. * * @param property * the event field to imitate and the view property to animate. * @param listener * a listener to call * @return this builder for chaining */ public Builder AddTranslateMotion(MotionProperty property, ISpringListener listener) { return(AddMotion(mSpringSystem.CreateSpring(), Imitator.TRACK_ABSOLUTE, Imitator.FOLLOW_EXACT, new MotionProperty[] { property }, new ISpringListener[] { listener })); }