[TIMOB-3122] iOS: ImageView animation ignores repeatCount upon second call to start()
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-03T14:44:04.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 3.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | core |
Reporter | jbwiv |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:37:29.000+0000 |
Updated | 2016-08-03T14:44:04.000+0000 |
Description
If you
start()
an animation created with an imageView, it will
honor the repeatCount setting the first time. However, if you call
start()
again, the animation will repeat indefinitely. Tested on
all versions of supported iOS.
Code to demonstrate:
var win1 = Titanium.UI.createWindow({
backgroundColor: '#fff'
});
var image_list = ["default_app_logo.png", "apple_logo.jpg"];
var animation = Ti.UI.createImageView({
images: image_list,
repeatCount: 1,
duration: 1000
});
win1.addEventListener("singletap", function(e) {
Ti.API.log("info", "Starting because of single tap.");
Ti.API.log("info", "repeatCount is: " + animation.repeatCount);
animation.start();
});
animation.addEventListener("stop", function(e) {
Ti.API.log("info", "animation shutting down properly");
});
win1.add(animation);
win1.open();
Tested on 1.8.0.1, still happening. Related to http://developer.appcelerator.com/question/130338/imageview-repeatcount-ignored-on-second-call Best, Mauro
Hello, happening in other community comments, as: http://developer.appcelerator.com/question/4831/imageview-repeatcount-bug http://developer.appcelerator.com/question/110991/imageview-animation-repeats-endlessly Best, Mauro
Tested on the iOS simulator using TiSDK 2.2.0v20120830102513, issue still valid.
this bug still happend
Replicated in iOS simulator using 3.2.3 SDK
Ok, so I just tested the issue using the provided code on 5.2.2.GA and 5.4.0 master. When clicking into the window, the animation starts properly, trying to call it again afterwards, it still works. Please test the above mentioned SDK's and provide feedback. Thank you!
I tried on Android 6, Nexus 5 on 5.2.2.GA. The problem I am getting is, if I set the repeatCount to 1, then the animation is not starting at all even after using image.start() (image is the imageView object). Please confirm this behavior. Thanks!
[~giriakash123] That's supposed to be the correct behavior, because a count = 0 would not even show it. Closing this (iOS) issue for now, if anyone still runs into it using Titanium 5.4.0+, let me know. Thanks!