-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(android): add stopAnimation() to View #10130
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @m1ga Thanks for yet another PR!
Some general thoughts:
- It feels odd to be calling this on the view itself, but I suppose we don't really return an object to call this on otherwise (we don't return something like a
Promise
to represent the operation). We could potentially call it on aTi.UI.Animation
object that you passed intoTi.UI.View#animate
. Makes me curious how this would play with an animation that transitions to a second view... - It also doesn't really give you control over exactly which animation it'd try and stop. I suppose only one animation per view at a time is executing given our API.
- Nor is there any feedback as to whether/when it gets canceled. Seems like for parity there should be a
'canceled'
event fired when an animation is canceled. Or maybe at least a boolean return value for this method to indicate that it will attempt to cancel (i.e. if we know there's no animation or it finished already we'd return false)? I don't see a nice backwards-compatible way to modify thecomplete
event to denote an animation was canceled/stopped.
@sgtcoolguy thanks for your feedback! As far as I remember you can do |
I think I can't make something like |
@m1ga Sorry about the delay in responding! Ok, yeah it makes sense that We call stopAnimation() on the view then. I'd still like to see some sort of feedback/mechanism like a callback to handle when an animation is canceled. Also, my OCD hates that both |
Added the |
@m1ga, calling Edit: |
@jquick-axway I've added |
Good question... because I'm wondering if setting Side Note: |
This reverts commit 734c41b.
great...my master branch is broken after testing the github issue PR 😞 need to fix that |
JIRA: https://jira.appcelerator.org/browse/AC-5931
Optional Description:
Android has no possibility to cancel/stop animations like moving an object from left to right before the duration is over. This PR adds a
stopAnimation()
method toTi.UI.View