Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ public abstract class BaseViewAnimator {

protected abstract void prepare(View target);

public void animate(View target) {
public BaseViewAnimator setTarget(View target) {
reset(target);
prepare(target);
return this;
}

public void animate() {
start();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void stop(boolean reset){
}

private BaseViewAnimator play() {
animator.setTarget(target);
animator.setDuration(duration)
.setInterpolator(interpolator)
.setStartDelay(delay);
Expand All @@ -149,7 +150,7 @@ private BaseViewAnimator play() {
}
}

animator.animate(target);
animator.animate();
return animator;
}

Expand Down