{ "id": "123400", "key": "TIMOB-15951", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15719", "description": "2013 Sprint 26", "name": "2013 Sprint 26", "archived": true, "released": true, "releaseDate": "2014-01-03" }, { "id": "15720", "description": "2013 Sprint 26 API", "name": "2013 Sprint 26 API", "archived": true, "released": true, "releaseDate": "2014-01-03" }, { "id": "15817", "description": "2014 Sprint 01", "name": "2014 Sprint 01", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15820", "description": "2014 Sprint 01 API", "name": "2014 Sprint 01 API", "archived": true, "released": true, "releaseDate": "2014-01-17" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-22T00:19:53.000+0000", "created": "2013-12-05T22:34:50.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "3.2.0", "Alloy", "android", "animation", "module_animation", "qe-closed-3.2.3", "qe-testadded", "regression", "triage" ], "versions": [], "issuelinks": [ { "id": "35947", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "127663", "key": "TIMOB-16625", "fields": { "summary": "Android - Animation exhibits bizarre behavior with or without complex layouts", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "34003", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "124201", "key": "TIMOB-16087", "fields": { "summary": "Android: Content inside of an animating container does not behave as expected", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-21T03:44:21.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Animating a child view contained in a view with a vertical layout no longer adjusts the other children as it used to. Now the views just stay stationary while the animation happens.\r\n\r\nthe following snippet shows the issue, the second square should be moving up and down to compensate for the animation but it doesn't now.\r\n\r\nh4. Sample Code:\r\n\r\n*index.xml*\r\n{code}\r\n\r\n\t\r\n\t\r\n\r\n{code}\r\n\r\n*index.js*\r\n{code:javascript}\r\nvar bBig = false;\r\n\r\nvar btn = Ti.UI.createButton( {\r\n\twidth : '90%',\r\n\theight : '40dp',\r\n\ttitle : 'Start Test',\r\n\ttop: 0\r\n} );\r\n\r\nvar parent = Ti.UI.createView({\r\n\theight: 100,\r\n\twidth: 100,\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar v1 = Ti.UI.createView({\r\n\theight: 50,\r\n\twidth: 50,\r\n\ttop: 5,\r\n\tbackgroundColor: 'red'\r\n});\r\n\r\nvar v2 = Ti.UI.createView({\r\n\theight: 50,\r\n\twidth: 50,\r\n\ttop: 20,\r\n\tbackgroundColor: 'blue'\r\n});\r\n\r\nbtn.addEventListener( 'click', function( e ) {\r\n\tif( !bBig ){\r\n\t\tbBig = true;\r\n\t\tv1.animate( Ti.UI.createAnimation({\r\n\t\t\theight:100,\r\n\t\t\tduration: 300\r\n\t\t}));\r\n\t} else {\r\n\t\tbBig = false;\r\n\t\tv1.animate( Ti.UI.createAnimation({\r\n\t\t\theight:50,\r\n\t\t\tduration: 300\r\n\t\t}));\r\n\t}\r\n} );\r\n$.index.add( btn );\r\n$.index.add( parent );\r\n\r\nparent.add( v1 );\r\nparent.add( v2 );\r\n\r\n$.index.open();\r\n{code}\r\n\r\nh4. Steps to reproduce:\r\n1. Create a new alloy project with the above code\r\n2. Run the app on an Android device, building with TiSDK 3.2.0\r\n3. Click the \"Start Test\" button\r\n4. Notice that the red box moves down and overlaps the blue box", "attachment": [], "flagged": false, "summary": "Android: Animating a child view in vertical layout no longer works correctly", "creator": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "jliddell", "key": "jliddell", "displayName": "John Liddell", "active": true, "timeZone": "America/Chicago" }, "environment": "Android, Titanium SDK 3.2.0, Alloy", "comment": { "comments": [ { "id": "283700", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I was able to reproduce this issue. In 3.2.0, when the \"Start Test\" button is clicked the red box moves down and overlaps the blue box. In 3.1.2, when the \"Start Test\" button is clicked the red box moves down and the blue box shrinks out of the way.\n\nThe blue box does not animate properly in SDK 3.2.0.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-11T00:31:33.000+0000", "updated": "2013-12-11T00:31:33.000+0000" }, { "id": "283736", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar bBig = false;\r\n \r\nvar btn = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Start Test',\r\n top: 0\r\n} );\r\n \r\nvar parent = Ti.UI.createView({\r\n height: 100,\r\n width: 100,\r\n layout: 'vertical'\r\n});\r\n \r\nvar v1 = Ti.UI.createView({\r\n height: 30,\r\n width: 50,\r\n top: 5,\r\n backgroundColor: 'red'\r\n});\r\n \r\nvar v2 = Ti.UI.createView({\r\n height: 50,\r\n width: 50,\r\n top: 20,\r\n backgroundColor: 'blue'\r\n});\r\n \r\nbtn.addEventListener( 'click', function( e ) {\r\n if( !bBig ){\r\n bBig = true;\r\n v1.animate( Ti.UI.createAnimation({\r\n height:70,\r\n duration: 300\r\n }));\r\n } else {\r\n bBig = false;\r\n v1.animate( Ti.UI.createAnimation({\r\n height:30,\r\n duration: 300\r\n }));\r\n }\r\n} );\r\nwin.add( btn );\r\nwin.add( parent );\r\n \r\nparent.add( v1 );\r\nparent.add( v2 );\r\n \r\nwin.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-11T04:27:27.000+0000", "updated": "2013-12-11T20:54:50.000+0000" }, { "id": "283872", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In 3.2.0 (TIMOB-11811), we start to use the new animation mechanism - [Property Animation|http://android-developers.blogspot.com/2011/02/animation-in-honeycomb.html]. The size/location animation inside a vertical/horizontal layout is broken under the property animation mechanism right now. Here is a temporary workaround for the above test case:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"white\"\r\n});\r\n\r\nvar bBig = false;\r\n\r\nvar btn = Ti.UI.createButton({\r\n\twidth : '90%',\r\n\theight : '40dp',\r\n\ttitle : 'Start Test',\r\n\ttop : 0\r\n});\r\n\r\nvar parent = Ti.UI.createView({\r\n\theight : 100,\r\n\twidth : 100,\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar v1 = Ti.UI.createView({\r\n\theight : 30,\r\n\twidth : 50,\r\n\ttop : 5,\r\n\tbackgroundColor : 'red'\r\n});\r\n\r\nvar v2 = Ti.UI.createView({\r\n\theight : 50,\r\n\twidth : 50,\r\n\ttop : 20, // This value is relative to the red view since it's in a vertical layout.\r\n\tbackgroundColor : 'blue'\r\n});\r\n\r\nbtn.addEventListener('click', function(e) {\r\n\tif (!bBig) {\r\n\t\tbBig = true;\r\n\t\tvar animation1 = Ti.UI.createAnimation({\r\n\t\t\theight : 70,\r\n\t\t\tduration : 300\r\n\t\t});\r\n\t\tv1.animate(animation1);\r\n\r\n\t\t// Since the vertical layout is not taken into account during the animation,\r\n\t\t// we need to animate the blue view manually here. The view position \"top\"\r\n\t\t// has to be relative to its parent.\r\n\t\tvar animation2 = Ti.UI.createAnimation({\r\n\t\t\ttop : 95,\r\n\t\t\tduration : 300\r\n\t\t});\r\n\t\tv2.animate(animation2);\r\n\r\n\t\t// For Android API level < 11, the final position \"top\" of the blue view\r\n\t\t// should be relative to the red view.\r\n\t\tif (Ti.Platform.Android.API_LEVEL < 11) {\r\n\t\t\tanimation2.addEventListener(\"complete\", function() {\r\n\t\t\t\tv2.top = 20;\r\n\t\t\t});\r\n\t\t}\r\n\t} else {\r\n\t\tbBig = false;\r\n\t\tvar animation1 = Ti.UI.createAnimation({\r\n\t\t\theight : 30,\r\n\t\t\tduration : 300\r\n\t\t});\r\n\t\tv1.animate(animation1);\r\n\r\n\t\tvar animation2 = Ti.UI.createAnimation({\r\n\t\t\ttop : 55,\r\n\t\t\tduration : 300\r\n\t\t});\r\n\t\tv2.animate(animation2);\r\n\r\n\t\tif (Ti.Platform.Android.API_LEVEL < 11) {\r\n\t\t\tanimation2.addEventListener(\"complete\", function() {\r\n\t\t\t\tv2.top = 20;\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n});\r\nwin.add(btn);\r\nwin.add(parent);\r\n\r\nparent.add(v1);\r\nparent.add(v2);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-11T21:16:57.000+0000", "updated": "2013-12-11T21:20:10.000+0000" }, { "id": "284277", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Extended test case: \r\n{code}\r\nvar tests = {};\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\nvar section = Ti.UI.createListSection({\r\n headerTitle : 'Animation Test'\r\n});\r\nsection.setItems([{\r\n properties : {\r\n title : 'Vertical Layout',\r\n itemId : 'vertical',\r\n font : {\r\n fontSize : 20\r\n }\r\n }\r\n}, {\r\n properties : {\r\n title : 'Horizontal Layout',\r\n itemId : 'horizontal',\r\n font : {\r\n fontSize : 20\r\n }\r\n }\r\n}]);\r\nvar listView = Ti.UI.createListView({\r\n backgroundColor : \"white\",\r\n sections : [section]\r\n});\r\n \r\nlistView.addEventListener('itemclick', function(e) {\r\n var f = tests[e.itemId];\r\n if (f)\r\n f();\r\n});\r\n \r\nwin.add(listView);\r\n \r\ntests.vertical = function() {\r\n var win = Ti.UI.createWindow({\r\n fullscreen : false,\r\n backgroundColor : 'white',\r\n title : 'Vertical Tests'\r\n });\r\n var bScale = false;\r\n var bTrans = false;\r\n var bST = false;\r\n \r\n \r\n var btn = Ti.UI.createButton({\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scale Test',\r\n top : 0\r\n });\r\n \r\n var btn2 = Ti.UI.createButton({\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Translation Test',\r\n top : '50dp'\r\n });\r\n \r\n var btn3 = Ti.UI.createButton({\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scaling + Translation Test',\r\n top : '90dp'\r\n });\r\n \r\n var parent = Ti.UI.createView({\r\n height : 100,\r\n width : 100,\r\n backgroundColor: 'yellow',\r\n layout : 'vertical'\r\n });\r\n \r\n var v1 = Ti.UI.createView({\r\n height : 50,\r\n width : 50,\r\n top : 5,\r\n backgroundColor : 'red'\r\n });\r\n \r\n var v2 = Ti.UI.createView({\r\n height : 50,\r\n width : 50,\r\n top : 20,\r\n backgroundColor : 'blue'\r\n });\r\n \r\n btn.addEventListener('click', function(e) {\r\n if (!bScale) {\r\n bScale = true;\r\n v1.animate(Ti.UI.createAnimation({\r\n height : 100,\r\n duration : 300\r\n }));\r\n } else {\r\n bScale = false;\r\n v1.animate(Ti.UI.createAnimation({\r\n height : 50,\r\n duration : 300\r\n }));\r\n }\r\n });\r\n \r\n btn2.addEventListener('click', function(e) {\r\n if (!bTrans) {\r\n bTrans = true;\r\n v1.animate(Ti.UI.createAnimation({\r\n top : 50,\r\n duration : 300\r\n }));\r\n } else {\r\n bTrans = false;\r\n v1.animate(Ti.UI.createAnimation({\r\n top : 5,\r\n duration : 300\r\n }));\r\n }\r\n });\r\n \r\n btn3.addEventListener('click', function(e) {\r\n if (!bST) {\r\n bST = true;\r\n v1.animate(Ti.UI.createAnimation({\r\n height : 100,\r\n top: 50,\r\n duration : 300\r\n }));\r\n } else {\r\n bST = false;\r\n v1.animate(Ti.UI.createAnimation({\r\n height : 50,\r\n top: 5,\r\n duration : 300\r\n }));\r\n }\r\n });\r\n win.add(btn);\r\n win.add(btn2);\r\n win.add(btn3);\r\n win.add(parent);\r\n \r\n parent.add(v1);\r\n parent.add(v2);\r\n \r\n win.open();\r\n};\r\n \r\ntests.horizontal = function() {\r\n var win = Ti.UI.createWindow({\r\n fullscreen : false,\r\n backgroundColor : 'white',\r\n title : 'Horizontal Tests'\r\n });\r\n var bScale = false;\r\n var bTrans = false;\r\n var bST = false;\r\n \r\n \r\n var btn = Ti.UI.createButton({\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scale Test',\r\n top : 0\r\n });\r\n \r\n var btn2 = Ti.UI.createButton({\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Translation Test',\r\n top : '50dp'\r\n });\r\n \r\n var btn3 = Ti.UI.createButton({\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scaling + Translation Test',\r\n top : '90dp'\r\n });\r\n \r\n var parent = Ti.UI.createView({\r\n height : 100,\r\n width : 140,\r\n backgroundColor: 'yellow',\r\n layout : 'horizontal'\r\n });\r\n \r\n var v1 = Ti.UI.createView({\r\n height : 50,\r\n width : 50,\r\n left : 5,\r\n backgroundColor : 'red'\r\n });\r\n \r\n var v2 = Ti.UI.createView({\r\n height : 50,\r\n width : 50,\r\n left : 20,\r\n backgroundColor : 'blue'\r\n });\r\n \r\n btn.addEventListener('click', function(e) {\r\n if (!bScale) {\r\n bScale = true;\r\n v1.animate(Ti.UI.createAnimation({\r\n width : 100,\r\n duration : 300\r\n }));\r\n } else {\r\n bScale = false;\r\n v1.animate(Ti.UI.createAnimation({\r\n width : 50,\r\n duration : 300\r\n }));\r\n }\r\n });\r\n \r\n btn2.addEventListener('click', function(e) {\r\n if (!bTrans) {\r\n bTrans = true;\r\n v1.animate(Ti.UI.createAnimation({\r\n left : 30,\r\n duration : 300\r\n }));\r\n } else {\r\n bTrans = false;\r\n v1.animate(Ti.UI.createAnimation({\r\n left : 5,\r\n duration : 300\r\n }));\r\n }\r\n });\r\n \r\n btn3.addEventListener('click', function(e) {\r\n if (!bST) {\r\n bST = true;\r\n v1.animate(Ti.UI.createAnimation({\r\n width : 100,\r\n left: 30,\r\n duration : 300\r\n }));\r\n } else {\r\n bST = false;\r\n v1.animate(Ti.UI.createAnimation({\r\n width : 50,\r\n left: 5,\r\n duration : 300\r\n }));\r\n }\r\n });\r\n win.add(btn);\r\n win.add(btn2);\r\n win.add(btn3);\r\n win.add(parent);\r\n \r\n parent.add(v1);\r\n parent.add(v2);\r\n \r\n win.open();\r\n \r\n};\r\n \r\nwin.open(); \r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-13T21:33:32.000+0000", "updated": "2013-12-16T22:47:17.000+0000" }, { "id": "284594", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/5128\r\nFor FR:\r\n1. Run the above test case in Hieu's comment and the test case below on 2.3, 3.x and 4.x devices.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar bBig = false;\r\n \r\nvar btn1 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scaling Test - vertical layout',\r\n top: 0\r\n} );\r\n\r\nvar btn1_2 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Translation Test - vertical layout',\r\n top: '40dp'\r\n} );\r\n \r\nvar parent1 = Ti.UI.createView({\r\n\ttop: '250dp',\r\n\tleft: 0,\r\n height: 100,\r\n width: 100,\r\n backgroundColor: 'yellow',\r\n layout: 'vertical'\r\n});\r\n \r\nvar v1 = Ti.UI.createView({\r\n height: 30,\r\n width: 50,\r\n top: 5,\r\n backgroundColor: 'red'\r\n});\r\n\r\nvar v1_1 = Ti.UI.createView({\r\n height: '50%',\r\n width: '50%',\r\n backgroundColor: 'green'\r\n});\r\nv1.add(v1_1);\r\n \r\nvar v2 = Ti.UI.createView({\r\n height: 50,\r\n width: 50,\r\n top: 20,\r\n backgroundColor: 'blue'\r\n});\r\n \r\nbtn1.addEventListener( 'click', function( e ) {\r\n if( !bBig ){\r\n bBig = true;\r\n var animation1 = Ti.UI.createAnimation({\r\n height:70,\r\n width: 80,\r\n duration: 300\r\n });\r\n v1.animate(animation1);\r\n } else {\r\n bBig = false;\r\n var animation1 = Ti.UI.createAnimation({\r\n height:30,\r\n width: 50,\r\n duration: 300\r\n });\r\n v1.animate(animation1);\r\n }\r\n} );\r\n\r\nvar bBig_2 = false;\r\nbtn1_2.addEventListener( 'click', function( e ) {\r\n if( !bBig_2 ){\r\n bBig_2 = true;\r\n var animation1 = Ti.UI.createAnimation({\r\n top: 40,\r\n duration: 300\r\n });\r\n v1.animate(animation1);\r\n } else {\r\n bBig_2 = false;\r\n var animation1 = Ti.UI.createAnimation({\r\n top: 5,\r\n duration: 300\r\n });\r\n v1.animate(animation1);\r\n }\r\n} );\r\n\r\n\r\nwin.add( btn1 );\r\nwin.add( btn1_2 );\r\nwin.add( parent1 );\r\n \r\nparent1.add( v1 );\r\nparent1.add( v2 );\r\n\r\n//******************************************************\r\nvar bBig1 = false;\r\n\r\nvar btn2 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scaling Test - horizontal layout',\r\n top: '80dp',\r\n} );\r\n\r\nvar btn2_2 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Translation Test - horizontal layout',\r\n top: '120dp',\r\n} );\r\n \r\nvar parent2 = Ti.UI.createView({\r\n\ttop: '250dp',\r\n\tleft: 105,\r\n height: 100,\r\n width: 120,\r\n backgroundColor: 'yellow',\r\n layout: 'horizontal'\r\n});\r\n \r\nvar v3 = Ti.UI.createView({\r\n height: 50,\r\n width: 30,\r\n left: 5,\r\n backgroundColor: 'red'\r\n});\r\n\r\nvar v3_1 = Ti.UI.createView({\r\n height: '50%',\r\n width: '50%',\r\n backgroundColor: 'green'\r\n});\r\nv3.add(v3_1);\r\n \r\nvar v4 = Ti.UI.createView({\r\n height: 50,\r\n width: 50,\r\n left: 20,\r\n backgroundColor: 'blue'\r\n});\r\n \r\nbtn2.addEventListener( 'click', function( e ) {\r\n if( !bBig1 ){\r\n bBig1 = true;\r\n var animation3 = Ti.UI.createAnimation({\r\n width:70,\r\n height: 70,\r\n duration: 300\r\n });\r\n v3.animate(animation3);\r\n } else {\r\n bBig1 = false;\r\n var animation3 = Ti.UI.createAnimation({\r\n width:30,\r\n height: 50,\r\n duration: 300\r\n });\r\n v3.animate(animation3);\r\n }\r\n} );\r\n\r\nvar bBig1_2 = false;\r\nbtn2_2.addEventListener( 'click', function( e ) {\r\n if( !bBig1_2 ){\r\n bBig1_2 = true;\r\n var animation3 = Ti.UI.createAnimation({\r\n left: 40,\r\n duration: 300\r\n });\r\n v3.animate(animation3);\r\n } else {\r\n bBig1_2 = false;\r\n var animation3 = Ti.UI.createAnimation({\r\n left: 5,\r\n duration: 300\r\n });\r\n v3.animate(animation3);\r\n }\r\n} );\r\n\r\nwin.add( btn2 );\r\nwin.add( btn2_2 );\r\nwin.add( parent2 );\r\n \r\nparent2.add( v3 );\r\nparent2.add( v4 );\r\n\r\n//******************************************************\r\nvar bBig2 = false;\r\n\r\nvar btn3 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scaling Test - composite layout',\r\n top: '160dp',\r\n} );\r\n\r\nvar btn3_2 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Translation Test - composite layout',\r\n top: '200dp',\r\n} );\r\n \r\nvar parent3 = Ti.UI.createView({\r\n\ttop: '250dp',\r\n\tleft: 230,\r\n height: 100,\r\n width: 120,\r\n backgroundColor: 'yellow'\r\n});\r\n \r\nvar v5 = Ti.UI.createView({\r\n height: 50,\r\n width: 50,\r\n left: 5,\r\n backgroundColor: 'red'\r\n});\r\n\r\nvar v5_1 = Ti.UI.createView({\r\n height: '50%',\r\n width: '50%',\r\n backgroundColor: 'green'\r\n});\r\nv5.add(v5_1);\r\n \r\nvar v6 = Ti.UI.createView({\r\n height: 50,\r\n width: 50,\r\n left: 60,\r\n backgroundColor: 'blue'\r\n});\r\n \r\nbtn3.addEventListener( 'click', function( e ) {\r\n if( !bBig2 ){\r\n bBig2 = true;\r\n var animation5 = Ti.UI.createAnimation({\r\n width: 80,\r\n height: 80,\r\n duration: 300\r\n });\r\n v5.animate(animation5);\r\n } else {\r\n bBig2 = false;\r\n var animation5 = Ti.UI.createAnimation({\r\n width: 50,\r\n height: 50,\r\n duration: 300\r\n });\r\n v5.animate(animation5);\r\n }\r\n} );\r\n\r\nvar bBig2_2 = false;\r\nbtn3_2.addEventListener( 'click', function( e ) {\r\n if( !bBig2_2 ){\r\n bBig2_2 = true;\r\n var animation5 = Ti.UI.createAnimation({\r\n left: 50,\r\n duration: 300\r\n });\r\n v5.animate(animation5);\r\n } else {\r\n bBig2_2 = false;\r\n var animation5 = Ti.UI.createAnimation({\r\n left: 5,\r\n duration: 300\r\n });\r\n v5.animate(animation5);\r\n }\r\n} );\r\n\r\nwin.add( btn3 );\r\nwin.add( btn3_2 );\r\nwin.add( parent3 );\r\n \r\nparent3.add( v5 );\r\nparent3.add( v6 );\r\n \r\nwin.open();\r\n{code}\r\n2. Run KS for a sanity check.\r\n3. Run Anvil. Should be 429 passed / 42 failed.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-16T23:08:41.000+0000", "updated": "2013-12-17T22:47:03.000+0000" }, { "id": "288015", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-open the ticket since found an issue regarding the 2DMatrix animation introduced by the above PR.\r\nTo reproduce the issue, run the code below. The view is scaled but the anchor point is not the center of the view.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\nvar matrix1 = Ti.UI.create2DMatrix({\r\n\tscale: 2\r\n});\r\n\r\n\r\nvar matrix2 = Ti.UI.create2DMatrix({\r\n\tscale: 0.5\r\n});\r\n\r\n \r\nvar bBig = false;\r\n \r\nvar btn1 = Ti.UI.createButton( {\r\n width : '90%',\r\n height : '40dp',\r\n title : 'Scaling Test - vertical layout',\r\n top: 0\r\n} );\r\n\r\nvar parent1 = Ti.UI.createView({\r\n top: '250dp',\r\n left: 0,\r\n height: 100,\r\n width: 100,\r\n backgroundColor: 'yellow',\r\n layout: 'vertical'\r\n});\r\n \r\nvar v1 = Ti.UI.createView({\r\n height: 30,\r\n width: 50,\r\n top: 5,\r\n backgroundColor: 'red'\r\n});\r\n \r\nvar v2 = Ti.UI.createView({\r\n height: 50,\r\n width: 50,\r\n top: 20,\r\n backgroundColor: 'blue'\r\n});\r\n \r\nbtn1.addEventListener( 'click', function( e ) {\r\n if( !bBig ){\r\n bBig = true;\r\n var animation1 = Ti.UI.createAnimation({\r\n transform: matrix1,\r\n duration: 300\r\n });\r\n v1.animate(animation1);\r\n } else {\r\n bBig = false;\r\n var animation1 = Ti.UI.createAnimation({\r\n transform: matrix2,\r\n duration: 300\r\n });\r\n v1.animate(animation1);\r\n }\r\n} );\r\n \r\n \r\nwin.add( btn1 );\r\nwin.add( parent1 );\r\n \r\nparent1.add( v1 );\r\nparent1.add( v2 );\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-13T21:15:18.000+0000", "updated": "2014-01-13T21:17:14.000+0000" }, { "id": "288373", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/5226 (in this PR I reverted the previous [PR#5128|https://github.com/appcelerator/titanium_mobile/pull/5128]).\r\n3_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/5245\r\nFor FR, please follow the testing steps in TIMOB-15951, TIMOB-16087, TIMOB-15719, TIMOB-2373, TIMOB-13536.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-16T00:12:59.000+0000", "updated": "2014-01-22T22:11:51.000+0000" }, { "id": "298042", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with:\r\n\r\nAppc Studio:3.2.3.201403190645\r\nSdk:3.2.3.v20140319174101\r\nalloy:1.3.1\r\ntitanium:3.2.1\r\ntitanium-code-processor:1.1.0\r\nOsx: Maverick(10.9.2)\r\nDevice:iPad(v6.1.3),LG-970(V4.0.4)\r\nxCode:5.1\r\n\r\nFollowed the last test Code.\r\nVerified animations works fine. \r\nHence closing the issue.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-20T11:03:07.000+0000", "updated": "2014-03-20T11:03:07.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }