{ "id": "67454", "key": "TIMOB-4328", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-06-05T22:41:19.000+0000", "created": "2011-06-06T12:36:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-05T22:41:19.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": "h1. Problem\r\nCalling \"hide()\" on a button doesn't hide the button if it is called before the window \"open\" event fires.\r\n\r\nh2. Sample Code\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\nwin.open();\r\n\r\nvar hiddenButton = Ti.UI.createButton({\r\n title: 'If you can see me, FAIL!',\r\n height: 40, width: 90,\r\n top: 45, left: 225,\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED\r\n});\r\nwin.add(hiddenButton);\r\nhiddenButton.hide();\r\n\r\n// Workaround: uncomment the following 3 lines and the button will be hidden.\r\n//win.addEventListener('open', function() {\r\n// hiddenButton.hide();\r\n//});\r\n{code}\r\n\r\nh2. Workaround\r\nListen for the 'open' event on the window, and call \"hide()\" then. See the commented code at the bottom of the code sample above to see this in action.\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-321235", "attachment": [], "flagged": false, "summary": "Android: \"hide()\" Does Nothing Before Window Opens", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK version: 1.8.0 (06/06/11 13:05 03c3608)\r\nWORKS on iPhone Simulator 4.3\r\nBROKEN on Samsung Epic 4G, Android 2.2", "comment": { "comments": [ { "id": "162199", "author": { "name": "yodzilla", "key": "yodzilla", "displayName": "Chris Hoopes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The workaround worked just fine for me. Thanks for the fix.", "updateAuthor": { "name": "yodzilla", "key": "yodzilla", "displayName": "Chris Hoopes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-08T19:59:22.000+0000", "updated": "2011-08-08T19:59:22.000+0000" }, { "id": "421047", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-05T22:41:19.000+0000", "updated": "2017-06-05T22:41:19.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }