public Motion(Spring spring, EventImitator imitator, Performer[] performers, ISpringListener[] springListeners) { //this(spring, new EventImitator[] { imitator }, performers, springListeners); this.spring = spring; this.imitators = new EventImitator[] { imitator }; this.performers = performers; this.springListeners = springListeners; }
/** * Uses a default {@link com.facebook.rebound.SpringConfig}. * * @param eventImitator * maps an event to a {@link com.facebook.rebound.Spring} * @param viewProperties * the {@link android.view.View} property to animate * @return the builder for chaining */ public Builder AddMotion(EventImitator eventImitator, params Android.Util.Property[] viewProperties) { Performer[] performers = new Performer[viewProperties.Length]; for (int i = 0; i < viewProperties.Length; i++) { performers[i] = new Performer(viewProperties[i]); } return(AddMotion(mSpringSystem.CreateSpring(), eventImitator, performers)); }
/** * @param spring * the underlying {@link com.facebook.rebound.Spring}. * @param eventImitator * maps an event to a {@link com.facebook.rebound.Spring} * @param performers * map the {@link com.facebook.rebound.Spring} to a * {@link android.view.View} * @return the builder for chaining */ public Builder AddMotion(Spring spring, EventImitator eventImitator, Performer[] performers) { Motion motion = new Motion(spring, eventImitator, performers, null); // connect actors motion.imitators[0].SetSpring(motion.spring); foreach (Performer performer in motion.performers) { performer.SetTarget(mView); } mMotions.Add(motion); return(this); }
/** * Uses a default {@link com.facebook.rebound.SpringConfig}. * * @param eventImitator * maps an event to a {@link com.facebook.rebound.Spring} * @param performers * map the {@link com.facebook.rebound.Spring} to a * {@link android.view.View} * @return the builder for chaining */ public Builder AddMotion(EventImitator eventImitator, Performer[] performers) { return(AddMotion(mSpringSystem.CreateSpring(), eventImitator, performers)); }