{ "id": "85863", "key": "TIMOB-7521", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2017-03-23T21:11:51.000+0000", "created": "2012-02-02T13:31:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "parity" ], "versions": [ { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T17:24:32.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": "h2. Problem\r\n\r\nIf you try an create an animation, it will silently fail if you use an animation object with properties that are created when the animation object is instantiated.\r\n\r\nThe test case works correctly on iOS 5.0 Simulator.\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\n// WORKS ON IOS\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nwin1.open();\r\n\r\n// First transform to minimize object\r\nvar transform1 = Titanium.UI.create2DMatrix();\r\ntransform1 = transform1.scale(0)\r\n\r\n// With properties:\r\nvar animation1 = Titanium.UI.createAnimation({\r\n\ttransform: transform1,\r\n\tduration: 750\r\n});\r\n// animation1.transform = transform1;\r\n// animation1.duration = 750;\r\n\r\n// Modal View\r\nvar mapView = Ti.UI.createView({\r\n\ttop : 40,\r\n\tbottom : 40,\r\n\tleft : 10,\r\n\tright : 10,\r\n\tzIndex : 10,\r\n\tbackgroundColor : '#000', // should be app wide style colour setting\r\n\tborderRadius : 12,\r\n\tborderWidth : 6,\r\n\tborderColor : 'blue',\r\n\topacity : 1 // ensure its not showing\r\n});\r\n\r\nwin1.add(mapView);\r\n\r\nmapView.animate(animation1);\r\n{code}\r\n\r\nh2. Workaround\r\n\r\nCreate the animation object, then assign the properties to it.\r\n\r\n{code:lang=javascript|title=app.js}\r\n// WORKS ON ANDROID & IOS\r\n\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nwin1.open();\r\n\r\n// First transform to minimize object\r\nvar transform1 = Titanium.UI.create2DMatrix();\r\ntransform1 = transform1.scale(0);\r\n\r\n// Without properties:\r\nvar animation1 = Titanium.UI.createAnimation();\r\nanimation1.transform = transform1;\r\nanimation1.duration = 750;\r\n\r\n// Modal View\r\nvar mapView = Ti.UI.createView({\r\n\ttop : 40,\r\n\tbottom : 40,\r\n\tleft : 10,\r\n\tright : 10,\r\n\tzIndex : 10,\r\n\tbackgroundColor : '#000', // should be app wide style colour setting\r\n\tborderRadius : 12,\r\n\tborderWidth : 6,\r\n\tborderColor : 'blue',\r\n\topacity : 1 // ensure its not showing\r\n});\r\n\r\nwin1.add(mapView);\r\n\r\nmapView.animate(animation1);\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: UI.Animation fails silently if properties set on creation", "creator": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium Mobile 1.8.1\r\n* HTC Wildfire S + Android 2.3.5\r\n* Emulator + Android 2.3.4\r\n* Titanium Studio, build: 1.0.8.201201262211\r\n* Mac OS X 10.6\r\n", "comment": { "comments": [ { "id": "182725", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-10T04:58:43.000+0000", "updated": "2012-02-10T04:58:43.000+0000" }, { "id": "197143", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can not reproduce with latest master.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-04T15:21:45.000+0000", "updated": "2012-06-04T15:21:45.000+0000" }, { "id": "416505", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as it has been over 5 years since the last update. Please open a new ticket if you have a problem.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T17:24:32.000+0000", "updated": "2017-03-31T17:24:32.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }