{ "id": "63531", "key": "TIMOB-2899", "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": "2012-07-26T13:38:17.000+0000", "created": "2011-04-15T03:32:25.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "19331", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "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": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-26T21:29:59.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": "{html}
Hi,
\nI read a lot of things with back button and exit button, but\nnothing answer me.
\nIs it possible to do an EXIT Button which exit app like pressing\nback button in a light window ?
\nI give you a code that works but only when you launch it a second\ntime (don't know why) !
\napp.js
\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\nTitanium.UI.setBackgroundColor('#000');\nTi.include('mainCloseView.js');\nvar FTimer = null;\nfunction DoTimeout()\n{\n// clearTimeout(FTimer);
\n
\n\n\n
\n
\n\nDoCloseMainWin();
\n
\n\n\n\n\n
\n}\nDoMainCloseView();\nFTimer = setTimeout( DoTimeout, 5000);\n
mainCloseView.js
\nvar MainCloseWin = null;\nfunction DoMainCloseView()\n{
\n
\n\n\n
\n
\n\nMainCloseWin = Titanium.UI.createWindow({\ntitle:'TabViewLogin',\nexitOnClose:true,\nnavBarHidden: true\n});\nMainCloseWin.open();
\n
\n\n\n\n\n
\n}\nfunction DoCloseMainWin(){\n\n
\nMainCloseWin.close();
\n
\n\n\n\n\nWith or without navBarHidden it's the same thing.
\n}\n