|
@@ -41,14 +41,11 @@ public class ValueAnimationOptions {
|
41
|
41
|
private Interpolation interpolation = Interpolation.NO_VALUE;
|
42
|
42
|
|
43
|
43
|
Animator getAnimation(View view) {
|
44
|
|
- if (!this.from.hasValue() || !this.to.hasValue())
|
45
|
|
- throw new IllegalArgumentException("Params 'from' and 'to' are mandatory");
|
46
|
|
- ObjectAnimator animator = ObjectAnimator.ofFloat(view, animProp, this.from.get(), this.to.get());
|
47
|
|
- animator.setInterpolator(this.interpolation.getInterpolator());
|
48
|
|
- if (this.duration.hasValue())
|
49
|
|
- animator.setDuration(this.duration.get());
|
50
|
|
- if (this.startDelay.hasValue())
|
51
|
|
- animator.setStartDelay(this.startDelay.get());
|
|
44
|
+ if (!from.hasValue() || !to.hasValue()) throw new IllegalArgumentException("Params 'from' and 'to' are mandatory");
|
|
45
|
+ ObjectAnimator animator = ObjectAnimator.ofFloat(view, animProp, from.get(), to.get());
|
|
46
|
+ animator.setInterpolator(interpolation.getInterpolator());
|
|
47
|
+ if (duration.hasValue()) animator.setDuration(duration.get());
|
|
48
|
+ if (startDelay.hasValue()) animator.setStartDelay(startDelay.get());
|
52
|
49
|
return animator;
|
53
|
50
|
}
|
54
|
51
|
|
|
@@ -56,10 +53,7 @@ public class ValueAnimationOptions {
|
56
|
53
|
public boolean equals(Object o) {
|
57
|
54
|
if (this == o) return true;
|
58
|
55
|
if (o == null || getClass() != o.getClass()) return false;
|
59
|
|
-
|
60
|
|
- ValueAnimationOptions options = (ValueAnimationOptions) o;
|
61
|
|
-
|
62
|
|
- return animProp.equals(options.animProp);
|
|
56
|
+ return animProp.equals(((ValueAnimationOptions) o).animProp);
|
63
|
57
|
}
|
64
|
58
|
|
65
|
59
|
@Override
|