File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
library/src/main/java/com/daimajia/androidanimations/library Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,13 @@ public abstract class BaseViewAnimator {
4545
4646 protected abstract void prepare (View target );
4747
48- public void animate (View target ) {
48+ public BaseViewAnimator setTarget (View target ) {
4949 reset (target );
5050 prepare (target );
51+ return this ;
52+ }
53+
54+ public void animate () {
5155 start ();
5256 }
5357
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ public void stop(boolean reset){
139139 }
140140
141141 private BaseViewAnimator play () {
142+ animator .setTarget (target );
142143 animator .setDuration (duration )
143144 .setInterpolator (interpolator )
144145 .setStartDelay (delay );
@@ -149,7 +150,7 @@ private BaseViewAnimator play() {
149150 }
150151 }
151152
152- animator .animate (target );
153+ animator .animate ();
153154 return animator ;
154155 }
155156
You can’t perform that action at this time.
0 commit comments