{ "id": "115730", "key": "TIMOB-14178", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-09T00:39:12.000+0000", "created": "2013-06-10T10:51:20.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "exalture", "module_switch", "notable", "qe-manualtest", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "44272", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "134003", "key": "TIMOB-17443", "fields": { "summary": "Android: Include native Switch UI element", "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": "None", "id": "6" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2015-03-19T22:09:43.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": "It would be nice to have a Real Android Switch when developing for Android 14 and above. The one supplied with Titanium now is not very nice.", "attachment": [ { "id": "39644", "filename": "settings_master_on_off_2.png", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2013-06-10T10:51:20.000+0000", "size": 170058, "mimeType": "image/png" }, { "id": "39704", "filename": "switch2.jpg", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2013-06-11T08:06:49.000+0000", "size": 2792831, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Real Switch on Android", "creator": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "subtasks": [], "reporter": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android", "closedSprints": [ { "id": 272, "state": "closed", "name": "2014 Sprint 25 SDK", "startDate": "2014-12-08T22:49:31.264Z", "endDate": "2014-12-22T01:00:00.000Z", "completeDate": "2015-01-05T18:18:28.523Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "256962", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Thomas, \n\nHave you tried using the holo themes and the UI components (eg. the switches) that come with that? By default the android UI features are from API level 8 but it is possible to get a different, more modern looking UI for API levels 14 and up by using the holo themes (light or dark). This should give you a nicer looking switch. \n\nFor more reference: http://developer.appcelerator.com/question/130719/how-do-you-build-your-app-with-holo-theme\n\nAlso, it is possible to create your own custom switch if what you are looking for is not available, but the holo theme'd switches should be fine for what you are asking. If you have any more questions or comments please feel free to ask.\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-10T18:15:37.000+0000", "updated": "2013-06-10T18:15:37.000+0000" }, { "id": "257117", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Hi Carter... \r\nI Attached a picture of a switch with halo enabled... and it does not look anything like the ones in settings..\r\nI'm from denmark so Til = On :)\r\nAm I doing something wrong ?\r\n\r\n\t\r\n\t\t\t\r\n\t\r\n", "updateAuthor": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2013-06-11T08:10:09.000+0000", "updated": "2013-06-11T08:11:08.000+0000" }, { "id": "257135", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Thomas,\n\nSorry for the confusion here, you are indeed right, the switches in Titanium are just Android toggles, unless specified as a checkbox, and there is a need for real switches that correlate to the native android UI. I will move this to engineering and they will process your request. Thanks for the suggestion.\n\nRegards,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-11T13:59:40.000+0000", "updated": "2013-06-11T13:59:40.000+0000" }, { "id": "307985", "author": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's a native module for it: https://github.com/dbankier/RealSwitch", "updateAuthor": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T09:26:12.000+0000", "updated": "2014-06-09T09:26:12.000+0000" }, { "id": "326582", "author": { "name": "astjohn", "key": "astjohn", "displayName": "Adam", "active": true, "timeZone": "America/Havana" }, "body": "David: Thanks for the module. I'm surprised the titanium dev's didn't include this in their recent 3.4.0 release... Android 4.0 has been out for quite some time now...", "updateAuthor": { "name": "astjohn", "key": "astjohn", "displayName": "Adam", "active": true, "timeZone": "America/Havana" }, "created": "2014-10-01T14:28:36.000+0000", "updated": "2014-10-01T14:29:00.000+0000" }, { "id": "331199", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/6324\r\nAdded support for switch for ICS and older versions", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-11-07T18:04:23.000+0000", "updated": "2014-11-07T18:04:23.000+0000" }, { "id": "331458", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirming that on SDK 14+ we should show a switch, otherwise a toggle. [~rblalock] [~aleard] [~grantges] Thoughts?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-10T22:12:31.000+0000", "updated": "2014-11-17T21:16:02.000+0000" }, { "id": "332571", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Okay, so the Titans would like access to both switch types.\r\n\r\nBy default, use old style, pre-14, use new style post-14\r\nBut, allow option to use old style, post-14", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-17T21:25:05.000+0000", "updated": "2014-11-17T21:25:05.000+0000" }, { "id": "332573", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Pre 14 we should default to the older square version. 14 and higher default to the newer and much better looking and correct version.\r\n\r\nHowever I suggest that the option to swap between is maintained so those that built a UI around the older square (ugly) version may continue to support that.\r\n\r\nI may be wrong but I thought there was a third-type switch native to Android. Whilst you are in there, throw it in if it does exist please.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-11-17T21:26:19.000+0000", "updated": "2014-11-17T21:26:19.000+0000" }, { "id": "332578", "author": { "name": "ralcocer", "key": "ralcocer", "displayName": "Ricardo Alcocer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~core13], only two according to this: http://developer.android.com/guide/topics/ui/controls/togglebutton.html", "updateAuthor": { "name": "ralcocer", "key": "ralcocer", "displayName": "Ricardo Alcocer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-17T21:34:02.000+0000", "updated": "2014-11-17T21:34:02.000+0000" }, { "id": "332591", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "The 4.0+ switch can manifest itself with at least 2 different styles.\r\n\r\n!http://content.screencast.com/users/Stephen_Feather/folders/Jing/media/9d78e10c-aceb-46af-a7a3-89fdf3ce474d/00000705.png!\r\n\r\none shown in the android docs, with the sharp razor edge feel, or the above.", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-11-17T23:00:53.000+0000", "updated": "2014-11-17T23:00:53.000+0000" }, { "id": "332686", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Ricardo, yes but those are only the toggle subset, however - these were the others; http://developer.android.com/design/building-blocks/switches.html\r\n\r\nThe existing switch on android provides a toggle button as default or a check box with a style property change. This however does not include the related radio version which would be a very welcome addition - even if the toggle state was left to the developer (assuming the action would not be handled automatically thus Appc work would be increased).\r\n\r\nSo in reality we have;\r\n- Toggle Button / On Off Button\r\n- Check Box\r\n- Radio Button\r\n\r\nThe UI of the On/OFF button changes massively between pre and post 4.x Android. Given the lack of a true Android 4.x UI version of the On/Off Button - many devs will have built UIs around the only alternative. Changing the UI to match one control is often not as easy as it sounds as large projects need sign off on UI changes.\r\n\r\nI welcome and beg for the correct 4.x On/Off - but other devs will need to be able to switch back.\r\n\r\nAs Titanium appears to have created a synthetic version of the true/control (assuming that is the reason it did not inherit the correct style change in 4.x) then that should be maintained at least for a couple of releases.\r\n\r\nNotes;\r\n- Titanium.UI.Android.SWITCH_STYLE_CHECKBOX\r\n- Titanium.UI.Android.SWITCH_STYLE_TOGGLEBUTTON", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-11-18T10:08:45.000+0000", "updated": "2014-11-18T10:08:45.000+0000" }, { "id": "346595", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the implementation. Devices with API 14+ will see the new switch by default while API<14 will see the old version of switch. We can specify style:Titanium.UI.Android.SWITCH_STYLE_TOGGLEBUTTON_OLD for devices with API 14+ for the old version of switch.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.5.1.201412091616\r\nTi SDK : 4.0.0.v20150317234215\r\nCLI : 4.0.0-alpha\r\nAlloy : 1.6.0-alpha\r\nMAC Yosemite : 10.10.2\r\nNexus 5: Android 5.0\r\nSamsung Galaxy S3 : Android 4.0.4 ", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-19T22:09:10.000+0000", "updated": "2015-03-19T22:09:26.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }