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

Custom Animations #28

Closed
robertoestivill opened this issue Nov 19, 2014 · 10 comments
Closed

Custom Animations #28

robertoestivill opened this issue Nov 19, 2014 · 10 comments

Comments

@robertoestivill
Copy link
Contributor

Greetings,

I have been browsing the code for a few hours, and I couldn't find a way to use the library with custom animations, meaning that we are limited by the animations provided in the Techniques enum.

Is there any way I can extends BaseViewAnimator to provide custom (programmer defined) animations to be used within the library or do I need to roll old fashioned animations manually?

Thanks
Robert

@daimajia
Copy link
Owner

Hey, guy.
You need to create a new class which extends from BaseViewAnimator and override the prepare method.

@robertoestivill
Copy link
Contributor Author

Correct, that would be the first step.
But what I don't seem to get is how to use it and pass it in to be used as any of the animations defined in the library.

YoYo.with( ) is not an option, since it takes a Technique which is an already defined Enum.
I can't instantiate YoYo, YoYoString, or AnimationComposer since the constructor methods are private.

So how do I provide the BaseViewAnimator subclass for the library to use?

@daimajia
Copy link
Owner

It's really a problem... my bad design...

I'll fix this before tommorow.

@robertoestivill
Copy link
Contributor Author

Cool, thanks for the quick fix.
Any plans on doing a release to maven repos soon ?

@daimajia
Copy link
Owner

I'm releasing a new version, wait a second. Please have a test if it works well.

@robertoestivill
Copy link
Contributor Author

I modified the ExampleActivity in the demo to use a custom BaseViewAnimator and everything works just fine. Also the code changes look clean to me.

Thanks

@daimajia
Copy link
Owner

Cool, after 10(or maybe longer ) minutes, you can update your gradle to version 1.1.3.

daimajia added a commit that referenced this issue Nov 20, 2014
@moopat
Copy link

moopat commented Dec 1, 2014

Hi,
if you have time, could you please also update the JAR download links in the README section of the project, so the updates can be used in Eclipse as well?

Thanks!

@daimajia
Copy link
Owner

daimajia commented Dec 1, 2014

Ok, I'll do it right now.

@daimajia
Copy link
Owner

daimajia commented Dec 1, 2014

@moopat Solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants