Comments (8)
Hi @jemshit, that should be how you cancel animations...
Can you try doing AdditiveAnimator.cancelAnimations(image)
to see if that works?
from android_additive_animations.
It works, thanks.
from android_additive_animations.
Glad you got it to work!
I'll look into why the method you tried didn't cancel the animations, can you post the full animation creation?
from android_additive_animations.
from android_additive_animations.
Thanks, I'll try to reproduce.
Btw, I will probably deprecate and later remove the cancel()
methods from the animator to discourage storing animator objects.
from android_additive_animations.
from android_additive_animations.
Basically it was a design decision to dodge a set of issues that additive animations have - since they are inherently stateful, it's not obvious what should happen in the start - cancel - restart case:
Would the user expect the animation to restart where the view was when the animation was first created? Or should it restart from the current position?
How would that affect other running additive animations on the same property? What if you then()
-chain more animations on the same animator after calling cancel()
?
I didn't (and still don't) have good answers to these questions, and I don't think anything I could come up with would make intuitive sense in all cases.
The current API removes the statefulness by making animators single-use throwaway objects.
from android_additive_animations.
I get it
from android_additive_animations.
Related Issues (19)
- Gradle build failed HOT 4
- Leak HOT 9
- Properly blend delayed animations HOT 5
- Provide Kotlin extensions HOT 2
- How to reset, reverse and pause/resume additive animations? HOT 1
- Using setStartDelay after creating a staggered animation removes stagger
- Move to AndroidX HOT 3
- Move away from jcenter HOT 2
- Library sometimes crashes when mRunningAnimationsManager is null internally HOT 6
- Content gone in 1.9.2 but works in 1.9.1 HOT 2
- Remove gifs from this repo
- iOS? HOT 1
- superfluous? HOT 1
- purpose? HOT 1
- effect? HOT 1
- Annoying `AdditiveAnimator` constructor with Kotlin HOT 7
- Question HOT 13
- pivotXY for view rotation around center 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 android_additive_animations.