public Cancellable start(Callback callback) {
return start(Duration.currentTimeMillis(), callback);
}
public Cancellable start(double startTime, final Callback callback) {
Animation animation = new Animation() {
@Override
protected void onUpdate(double progress) {
callback.update(transition.translate(progress));
if (progress == 1.0) {
callback.finished();
}
}
};
animation.run(duration, startTime);
return new AnimationCancellable(animation);
}