diff --git a/lib/src/main/java/com/fanwe/lib/animator/BaseAnimator.java b/lib/src/main/java/com/fanwe/lib/animator/BaseAnimator.java index e504133..ffbfe55 100644 --- a/lib/src/main/java/com/fanwe/lib/animator/BaseAnimator.java +++ b/lib/src/main/java/com/fanwe/lib/animator/BaseAnimator.java @@ -176,11 +176,9 @@ public T startAsPop(boolean clone) imageView.attachTarget(target); imageView.setVisibility(target.isShown() ? View.VISIBLE : View.INVISIBLE); - T animator = (T) this; - if (clone) - animator = clone(); - + final T animator = clone ? clone() : (T) this; animator.setTarget(imageView).start(); + return animator; } return null;