Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16918] Android: 'right' and 'bottom' animations broken for Honeycomb+ devices

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-05-23T17:08:50.000+0000
Affected Version/sRelease 3.2.3
Fix Version/s2014 Sprint 10, 2014 Sprint 10 SDK, Release 3.3.0, Release 3.4.0
ComponentsAndroid
Labelsandroid, module_animation, qe-testadded, regression
ReporterPaul Hamilton
AssigneeHieu Pham
Created2014-05-05T17:57:06.000+0000
Updated2014-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?

Comments

  1. Ritu Agrawal 2014-05-05

    [~paul h] Thank you for bringing this to our attention.
  2. Ritu Agrawal 2014-05-05

    Moving this to engineering as I can reproduce this issue on Samsung Galaxy S4 with the provided sample code.
  3. Paul Hamilton 2014-05-07

    It seems like both "right" and "bottom" annimations are broken
  4. Lokesh Choudhary 2014-05-07

    Verified the issue is reproducible in alloy & classic apps. We are investigating further on this issue. Test code for classic app:
       var 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();
       
    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.2
  5. Paul Hamilton 2014-05-07

    Another note: Not too surprisingly, this issue also exists in the CI 3.3.x builds. Same as 3.2.3
  6. Ingo Muschenetz 2014-05-15

    Possibly related to TIMOB-16614, TIMOB-16087, TIMOB-15951 or TIMOB-15719
  7. Hieu Pham 2014-05-16

    This regression is caused by https://github.com/appcelerator/titanium_mobile/pull/5226
  8. Hieu Pham 2014-05-17

    master PR: https://github.com/appcelerator/titanium_mobile/pull/5699
  9. Hieu Pham 2014-05-17

    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();
       
  10. Vishal Duggal 2014-05-20

    PR merged
  11. Hieu Pham 2014-05-20

    3.3.X PR: https://github.com/appcelerator/titanium_mobile/pull/5713
  12. Lokesh Choudhary 2014-05-23

    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

JSON Source