{ "id": "139149", "key": "TIMOB-17985", "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-06T15:08:19.000+0000", "created": "2014-11-06T05:38:08.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T21:57:38.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": "h3.Description\r\nIf I do not add a picker to the window showTimePickerDialog method does not work.\r\n\r\nh3. Testing Environment: \r\nTitanium SDK: 3.4.0\r\nTitanium CLI: 3.4.0\r\nAndroid SDK :4.2.2, 4.3, 4.4.2\r\nOS X Version: 10.9.5,\r\nAppcelerator Studio: 3.4.1\r\n\r\nh3. Steps to Reproduce:\r\n1. Create a Classic project.\r\n2. Paste this code in app.js file.\r\n3. Run this code with the testing environment.\r\n4. Click the time button time picker is not shown. \r\n5. Add the picker to the window and click the button time picker is shown.\r\n\r\n*Test Code*\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white',\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar timePicker = Ti.UI.createPicker({\r\n\t//top : 1000\r\n});\r\n\r\n// Create a Button.\r\nvar time = Ti.UI.createButton({\r\n\ttitle : 'Time',\r\n\theight : 50,\r\n\twidth : 100,\r\n\ttop : 20,\r\n});\r\n\r\n// Listen for click events.\r\ntime.addEventListener('click', function() {\r\n\ttimePicker.showTimePickerDialog({\r\n\t\tcallback : function(e) {\r\n\t\t\tif (e.cancel) {\r\n\t\t\t\tTi.API.info('User canceled dialog');\r\n\t\t\t} else {\r\n\t\t\t\tTi.API.info('User selected Time: ' + e.value);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n});\r\n\r\nwin.add(time);\r\n//win.add(timePicker);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nThanks.", "attachment": [], "flagged": false, "summary": "Android: showTimePickerDialog method does not work.", "creator": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": null, "comment": { "comments": [ { "id": "331019", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When you create a timePicker, you've not yet added it into the visual hierarchy. You need to add it to the window before showing it.\r\n\r\nEven if you assume that picker.showTimePickerDialog() should automatically add the picker to some window and show it, which window would it target?\r\n\r\nWe could update the documentation to make this explicitly stated.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-06T15:08:19.000+0000", "updated": "2014-11-06T15:08:19.000+0000" }, { "id": "414023", "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-20T21:57:38.000+0000", "updated": "2017-03-20T21:57:38.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }