Comments (5)
Okay, with a little messing around, I was able to fix it. I changed ObjectAnimator
to Animator
. This is my code:
if (reveal.isNativeAnimator()) {
Animator a = (Animator) reveal.get();
a.addListener(new Animator.AnimatorListener() {
// ...
});
} else {
com.nineoldandroids.animation.ObjectAnimator a = (com.nineoldandroids.animation.ObjectAnimator) reveal.get();
a.addListener(new com.nineoldandroids.animation.Animator.AnimatorListener() {
// ...
});
}
I don't think that I should close this issue yet, I think this should be implemented within the library. Anyways, awesome lib and thanks for the quick reply!
from circularreveal.
You can add listener through:
SupportAnimator reveal = ViewAnimationUtils.createCircularReveal(view, cX, cY, 0, radius);
if(reveal.isNativeAnimator()){
ObjectAnimator a = (ObjectAnimator) reveal.get();
//TODO add listener to android.animation.ObjectAnimator
}else{
ObjectAnimator a = (ObjectAnimator) reveal.get();
//TODO add listener to nineoldandroids
}
from circularreveal.
It seems to be working on Pre-lollipop devices but doesn't work on Lollipop. I get this error:
java.lang.ClassCastException: android.animation.RevealAnimator cannot be cast to android.animation.ObjectAnimator
This is my code:
if (reveal.isNativeAnimator()) {
android.animation.ObjectAnimator a = (android.animation.ObjectAnimator) reveal.get();
a.addListener(new Animator.AnimatorListener() {
public void onAnimationCancel (Animator animation) { }
public void onAnimationRepeat (Animator animation) { }
public void onAnimationStart (Animator animation) { commonOnStartStuff(); }
public void onAnimationEnd (Animator animation) { commonOnEndStuff(); }
});
} else {
com.nineoldandroids.animation.ObjectAnimator a = (com.nineoldandroids.animation.ObjectAnimator) reveal.get();
a.addListener(new com.nineoldandroids.animation.Animator.AnimatorListener() {
public void onAnimationCancel (com.nineoldandroids.animation.Animator animation) { }
public void onAnimationRepeat (com.nineoldandroids.animation.Animator animation) { }
public void onAnimationStart (com.nineoldandroids.animation.Animator animation) { commonOnStartStuff(); }
public void onAnimationEnd (com.nineoldandroids.animation.Animator animation) { commonOnEndStuff(); }
});
}
from circularreveal.
Thanks, have you an idea to solve this problem?
from circularreveal.
Yeah, a custom implementation of `AnimatorListerner' that does this?
from circularreveal.
Related Issues (20)
- java.lang.NoSuchMethodError: android.view.View.invalidateOutline
- is there any way to close reveal animation with drag like snap chat and wats app status
- createCircularReveal makes square reveal on API16 HOT 4
- First time Animation not showup in cirlce HOT 1
- Change shape of Reveal
- Feedback CircularReveal BUG
- How Sliding scale Circle?
- spelling mistakes in README file
- Problem with the depricated ActionBarActivity...
- Failed to resolve: com.github.ozodrukh:CircularReveal:2.0.1
- 0.3.5、0.4.0 无法解析
- Dependency conflicts HOT 1
- Interpolators don't appear to have an effect HOT 1
- java.lang.IllegalArgumentException: Parent must be instance of RevealViewGroup
- where is animator.reverse()? HOT 1
- unable to solve SupportAnimator HOT 1
- 1.0.5 release seems non-existing in jitpack
- targetSDKVersion should be updated
- Crazy Noizy Logs that
- Could not resolve com.github.ozodrukh:CircularReveal:2.1.0. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circularreveal.