Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimatorUpdateListener #7

Closed
AppWerft opened this issue Feb 12, 2017 · 3 comments
Closed

AnimatorUpdateListener #7

AppWerft opened this issue Feb 12, 2017 · 3 comments
Assignees

Comments

@AppWerft
Copy link

I think we need a snippet like this:

AnimatorUpdateListener updateListener = new AnimatorUpdateListener() {
	@Override
		public void onAnimationUpdate(ValueAnimator animator) {
			onFinish.call(getKrollObject(), new KrollDict());
		}
	};
lottieView.addAnimatorUpdateListener(updateListener);

inside private class.

@m1ga m1ga self-assigned this Feb 13, 2017
@m1ga
Copy link
Owner

m1ga commented Feb 13, 2017

Sorry, didn't get any notification for the issues 😞

Started to work on the listener part: https://github.com/m1ga/ti.animation/blob/master/android/src/ti/animation/LottieViewProxy.java#L86 (not working yet, will finish it soon)

@AppWerft
Copy link
Author

O I see, it is new since yesterday.

@m1ga
Copy link
Owner

m1ga commented Feb 25, 2017

Added update property:

var view = TiAnimation.createLottieView({
    file: 'sample_lottie.json',
    loop: false,
    bottom: 300,
    height: 120,
    width: 120,
    borderRadius: 60,
    update: onUpdate,
    autoStart: false
});
function onUpdate(e){
    console.log("Percentage: " + e.percentage);
}

Will expose the animationStart etc. soon

@m1ga m1ga closed this as completed Feb 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants