[TIMOB-16918] Android: 'right' and 'bottom' animations broken for Honeycomb+ devices
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-05-23T17:08:50.000+0000 |
| Affected Version/s | Release 3.2.3 |
| Fix Version/s | 2014 Sprint 10, 2014 Sprint 10 SDK, Release 3.3.0, Release 3.4.0 |
| Components | Android |
| Labels | android, module_animation, qe-testadded, regression |
| Reporter | Paul Hamilton |
| Assignee | Hieu Pham |
| Created | 2014-05-05T17:57:06.000+0000 |
| Updated | 2014-05-23T17:08:50.000+0000 |
Description
Not sure how this even got past testing. Pretty sure this is related to the animation changes you made from 3.2.2. A now simple animation completely breaks in this latest build, which is unfortunate as i was looking forward to some of these properties. Major regression.
Test case is simple, i want a View to slide over to reveal content underneath it.
in 3.2.2 This works as expected. In 3.2.3, seemingly the right side never moves?
Alloy
XML
<Alloy>
<Window id="win">
<View id="slidingContainer">
<Label>
This is really long text to showcase how the animation fails right off the start. This work fine in the previos 3.2.2 sdk. Something changed with annimations that broke this.
</Label>
</View>
</Window>
</Alloy>
Javascript
var anim = Ti.UI.createAnimation({
duration: 250
});
$.slidingContainer.addEventListener('click', function(){
var animateAmmount = 500;
var animationSuffix = "px";
anim.right = animateAmmount + animationSuffix;
anim.left = (animateAmmount * -1) + animationSuffix;
$.slidingContainer.animate(anim);
});
$.win.open();
TSS
"Window": {
backgroundColor: "blue",
fullscreen: true
}
"View":{
backgroundColor: "red",
left: 0,
right: 0,
top: 0,
bottom: 0
}
Any Workaround?
[~paul h] Thank you for bringing this to our attention.
Moving this to engineering as I can reproduce this issue on Samsung Galaxy S4 with the provided sample code.
It seems like both "right" and "bottom" annimations are broken
Verified the issue is reproducible in alloy & classic apps. We are investigating further on this issue. Test code for classic app:
Environment: Appc Studio : 3.3.0.201405011408 Ti SDK : 3.2.3.GA Mac OSX : 10.8.5 Alloy : 1.4.0-dev CLI - 3.3.0-dev Nexus 5 - android 4.4.2var win = Ti.UI.createWindow({ backgroundColor:"blue", fullscreen:true }); var view = Ti.UI.createView({ backgroundColor: "red", left: 0, right: 0, top: 0, bottom: 0 }); var label = Ti.UI.createLabel({ text:"This is animation test" }); var anim = Ti.UI.createAnimation({ duration: 250 }); view.addEventListener('click', function(){ var animateAmmount = 500; var animationSuffix = "px"; anim.right = animateAmmount + animationSuffix; anim.left = (animateAmmount * -1) + animationSuffix; view.animate(anim); }); view.add(label); win.add(view); win.open();Another note: Not too surprisingly, this issue also exists in the CI 3.3.x builds. Same as 3.2.3
Possibly related to TIMOB-16614, TIMOB-16087, TIMOB-15951 or TIMOB-15719
This regression is caused by https://github.com/appcelerator/titanium_mobile/pull/5226
master PR: https://github.com/appcelerator/titanium_mobile/pull/5699
Additional testing code:
var win = Ti.UI.createWindow({ backgroundColor:"blue", fullscreen:true }); var view = Ti.UI.createView({ backgroundColor: "red", left: '40dp', right: '40dp', top: '40dp', bottom: '40dp' }); var view2 = Ti.UI.createView({ backgroundColor: "green", left: '40dp', right: '40dp', top: '40dp', bottom: '40dp' }); var label = Ti.UI.createLabel({ text:"This is animation test. This is animation test." }); var anim = Ti.UI.createAnimation({ duration: 250 }); view2.addEventListener('click', function(){ var animateAmmount = 20; var animationSuffix = "dp"; anim.right = '100dp'; anim.left = '-20dp'; anim.top = '-20dp'; anim.bottom = '100dp'; view2.animate(anim); }); view.add(view2); view2.add(label); win.add(view); win.open();PR merged
3.3.X PR: https://github.com/appcelerator/titanium_mobile/pull/5713
Verified the fix. The view moves to reveal the view underneath & works as expected. Closing. Environment: Appc Studio : 3.3.0.201405211748 Ti SDK : 3.3.0.v20140522144936 Mac OSX : 10.8.5 Alloy : 1.4.0-alpha2 CLI - 3.3.0-alpha5 Code Processor: 1.1.1 Samsung Galaxy S4 running android 4.2.2