{ "id": "114982", "key": "TIMOB-14005", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15705", "description": "2013 Sprint 22 Core", "name": "2013 Sprint 22 Core", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-22T23:29:08.000+0000", "created": "2013-05-27T15:43:57.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "animation", "module_animation", "qe-testadded", "transform" ], "versions": [], "issuelinks": [ { "id": "29084", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "102748", "key": "AC-2053", "fields": { "summary": "Android: view.animate() crashes", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2014-02-24T10:55:43.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": "If you run the sample and tap on the red rectangle, it should animate from on position to another.\r\nIt works great on iOS.\r\nIt doesnt work on Android.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'gray'\r\n});\r\n\r\nvar isTransformed = false;\r\n\r\nvar view = Ti.UI.createView({\r\n\twidth:100,\r\n\theight:150,\r\n\tbackgroundColor:'red'\r\n})\r\n\r\nview.addEventListener('singletap', function(){\r\n\tif (isTransformed) {\r\n\t\tview.animate({transform:Ti.UI.create2DMatrix(), duration:200});\r\n\t}\r\n\telse {\r\n\t\tview.animate({transform:Ti.UI.create2DMatrix().translate(-50, 40).scale(0.2,0.4), duration:200});\r\n\t}\r\n\tisTransformed = !isTransformed;\r\n})\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Animation with transform not working", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium 3.1.0.GA\r\nAndroid SDK 4.1\r\nGalaxy S2", "comment": { "comments": [ { "id": "254119", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Martin,\n\nWhat exactly doesn't work for you? I have tested on device, Galaxy S3 and it is transforming as expected though admittedly not as smoothly as it does for iOS. Is this the 'not working' you are describing? Please try to be more clear in your description, what usually helps is having an Expected vs Actual behavior. Please see here: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report\nfor future reference. \n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-27T19:37:25.000+0000", "updated": "2013-05-27T19:37:25.000+0000" }, { "id": "254144", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Martin: You could also try the test case I added at TC-1342\n\nI'm also interested in this issue because view.animate() crashes in my [slider menu for Android|http://www.danielsefton.com/2013/05/slider-menu-widget-v2-for-titanium-alloy/], unfortunately I can't reproduce it with simple test cases :(", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-27T23:32:53.000+0000", "updated": "2013-05-27T23:32:53.000+0000" }, { "id": "254206", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Carter: Sorry i should have been more detailed. I thought the simple test code would say it all :)\nSo what you see is a red rectangle going back and forth from a scaled and translated position to a centered position.\nIt works great on iOS, but it doesnt on Android.\nAnd i find it really hard to believe that it works for you because seeing the code it s impossible. Actually i have tackled that bug a few times already without finding a good solution. It s all the 2DMatrix class which needs rewrite for that to work i think :s This is because when you animate a transform, it works only if you animate from identity, if it s not identity the interpolate wont work.\n\nI have looked at changing it all to use quaternion and slerp but it didnt work as planned ;)\nThat s why i created that bug", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-05-28T08:38:41.000+0000", "updated": "2013-05-28T08:38:41.000+0000" }, { "id": "254207", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Daniel: Can you give us a logcat on your crash?\nAlso i created a native slidermenu for ios and android, it works great. It s integrated in my private branch of Titanium. I hope to merge that with you guys ;)", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-05-28T08:40:57.000+0000", "updated": "2013-05-28T08:40:57.000+0000" }, { "id": "254352", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok, so it is the animation that is broken, but the transform is working fine that is what I was talking about. Reproduced on device:\nGalaxy S3\nTi SDK 3.1.0GA\nTitanium Studio, build: 3.1.0.201303032333\n\nMoving to Ti-Mobile", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-28T19:23:18.000+0000", "updated": "2013-05-28T19:23:18.000+0000" }, { "id": "270405", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "h3. Testing Notes\n\nTest is precisely the JS code given above - use it as app.js in a new project.\n\nWhen you run it, if you tap the red box it should shrink. Tap it again and it should grow again. Etc.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-09T20:39:11.000+0000", "updated": "2013-09-09T20:39:11.000+0000" }, { "id": "270407", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR:\n\nhttps://github.com/appcelerator/titanium_mobile/pull/4662", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-09T20:41:45.000+0000", "updated": "2013-09-09T20:41:45.000+0000" }, { "id": "270432", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Bill, this is a good idea to use translatex... But it wont work with complex matrices. This is because you need to decompose he matrix and using the operations like you do wont work. You can compare to the ios counterpart where everything is done by quartz. Plus your implementation will only work when going from or to the identity matrix. I posted a video of the result of my implementation. http://m.youtube.com/channel/UCZSYQNBf3yOr6WwDWIJGleg#/watch?v=A7yCg6bwRec&feature=c4-feed-u", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-09-09T21:19:08.000+0000", "updated": "2013-09-09T21:19:08.000+0000" }, { "id": "270433", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Bill, this is a good idea to use translatex... But it wont work with complex matrices. This is because you need to decompose he matrix and using the operations like you do wont work. You can compare to the ios counterpart where everything is done by quartz. Plus your implementation will only work when going from or to the identity matrix. I posted a video of the result of my implementation. http://m.youtube.com/channel/UCZSYQNBf3yOr6WwDWIJGleg#/watch?v=A7yCg6bwRec&feature=c4-feed-u", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-09-09T21:19:08.000+0000", "updated": "2013-09-09T21:19:08.000+0000" }, { "id": "270449", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Actually i have been thinking about it. Your implementation should work from/to any matrix. I am only worried about the computation of the correct rotation/scale ...", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-09-09T22:04:41.000+0000", "updated": "2013-09-09T22:04:41.000+0000" }, { "id": "270450", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Actually i have been thinking about it. Your implementation should work from/to any matrix. I am only worried about the computation of the correct rotation/scale ...", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-09-09T22:04:41.000+0000", "updated": "2013-09-09T22:04:41.000+0000" }, { "id": "276562", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test Environment - \nAppc Studio - 3.2.0.201310240448\nSDK - 3.2.0.v20131023171643\nacs -1.0.7\nalloy - 1.2.2\ntitanium - 3.2.0\ntitanium-code-processor - 1.0.3\nXcode - 5.0.1\nOS - Mac OS X Mavericks (10.9)\nDevice - Nexus7(v4.3), iPhone5(v7.0.2)\nResult - Now its working fine. Verified on Android and iOS both. Hence closing this issue.", "updateAuthor": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-24T10:27:34.000+0000", "updated": "2013-10-24T10:27:34.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }