{ "id": "135147", "key": "TIMOB-17630", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-11-17T23:41:55.000+0000", "created": "2014-08-22T01:31:00.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "TCSupport", "defect", "ios", "parity" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T19:11:49.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Opacity is an undocumented feature in tabgroup. However, setting it to either 1 or 0 when creating tabgroup does make difference - make tabgroup either visible or invisible. When trying to animate the closing and opening of tabgroup, only fade-out effect which sets opacity value from 1 to 0 within the specified duration time. Fade-in effect which works the other way around does not work at all. I think it is a parity issue?\r\n\r\nSee the code snippet below\r\n{code:title=\"index.js\"}\r\nvar global = {};\r\n\r\nvar baseWin = Ti.UI.createWindow({\r\n\ttitle : \"Main Window\",\r\n\tbackgroundColor : \"green\"\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle : \"Open TabGroup\"\r\n});\r\n\r\nbutton.addEventListener(\"click\", function() {\r\n\tglobal.tbg = buildTabGroup();\r\n\r\n\tfadeOut(baseWin, 2000, function() {\r\n\t\tshowTbgWithoutAnimation(); // this works \r\n // showTbgWithAnimation(); this does not work.\r\n\t});\r\n\r\n});\r\nbaseWin.add(button);\r\n\r\nfunction showTbgWithoutAnimation() {\r\n\tglobal.tbg.open();\r\n}\r\n\r\nfunction showTbgWithAnimation() {\r\n\tfadeIn(global.tbg, 2000, function() {\r\n\t\tglobal.tbg.open();\r\n\t});\r\n}\r\n\r\nfunction buildTabGroup() {\r\n\tvar self = Ti.UI.createTabGroup({\r\n\t\tbackgroundColor : \"green\",\r\n\t\topacity : 1\r\n\t});\r\n\tvar win1 = Ti.UI.createWindow(), win2 = Ti.UI.createWindow();\r\n\tvar btn1 = Ti.UI.createButton({\r\n\t\ttitle : \"close tbg\"\r\n\t});\r\n\r\n\tbtn1.addEventListener(\"click\", function(e) {\r\n\t\tfadeOut(global.tbg, 2000, function() {\r\n\t\t\tglobal.tbg.close();\r\n\t\t\tfadeIn(baseWin, 2000, function() {\r\n\t\t\t});\r\n\t\t});\r\n\t});\r\n\r\n\tvar tab1 = Ti.UI.createTab({\r\n\t\ttitle : L('home'),\r\n\t\ticon : '/images/KS_nav_ui.png',\r\n\t\twindow : win1\r\n\t});\r\n\twin1.containingTab = tab1;\r\n\tvar tab2 = Ti.UI.createTab({\r\n\t\ttitle : L('settings'),\r\n\t\ticon : '/images/KS_nav_views.png',\r\n\t\twindow : win2\r\n\t});\r\n\r\n\twin1.add(btn1);\r\n\twin2.containingTab = tab2;\r\n\tself.addTab(tab1);\r\n\tself.addTab(tab2);\r\n\r\n\treturn self;\r\n}\r\n\r\nfunction fadeIn(to, duration, finishCallback) {\r\n\tto.animate({\r\n\t\topacity : 1,\r\n\t\tduration : duration\r\n\t}, finishCallback);\r\n}\r\n\r\nfunction fadeOut(to, duration, finishCallback) {\r\n\tto.animate({\r\n\t\topacity : 0,\r\n\t\tduration : duration\r\n\t}, finishCallback);\r\n}\r\n\r\nbaseWin.open();\r\n{code}\r\n\r\nh4. Note : To see the bug, comment in showTbgWithAnimation(); and set opacity of tabgroup to 0\r\n\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Animation based on opacity does not work properly for TabGroup", "creator": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.3.0\r\niOS simulator 7.1", "comment": { "comments": [ { "id": "328404", "author": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem is animation will not work on window and tabgroup before they are opened.\r\nNot sure if this is a bug or not.\r\n", "updateAuthor": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-17T00:31:29.000+0000", "updated": "2014-10-17T00:31:29.000+0000" }, { "id": "332605", "author": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I reckon that behavior is correct. Please close this ticket\r\n\r\nThanks", "updateAuthor": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-17T23:34:05.000+0000", "updated": "2014-11-17T23:34:05.000+0000" }, { "id": "332610", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid based on commenter's feedback.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-17T23:41:55.000+0000", "updated": "2014-11-17T23:41:55.000+0000" }, { "id": "414339", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T19:11:49.000+0000", "updated": "2017-03-21T19:11:49.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }