{ "id": "89277", "key": "TIMOB-8453", "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": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2015-11-04T07:00:00.000+0000", "created": "2012-03-30T12:27:14.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "SupportTeam", "exalture" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "49624", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "152635", "key": "TIMOB-19859", "fields": { "summary": "Android: Deprecate Ti.Android.R.drawable", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-23T22:37:32.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": "h4. Problem Description\r\nCustomer wants to know why some drawables are commented out in TiFileHelper.java, there are:\r\n\r\n{code}\r\nif (systemIcons == null) {\r\n\t\t\t\tsystemIcons = new HashMap();\r\n\t\t\t\tsystemIcons.put(\"ic_menu_camera\", android.R.drawable.ic_menu_camera);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_compose\", android.R.drawable.ic_menu_compose);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_search\", android.R.drawable.ic_menu_search);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_add\", android.R.drawable.ic_menu_add);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_delete\", android.R.drawable.ic_menu_delete);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_archive\", android.R.drawable.ic_menu_archive);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_stop\", android.R.drawable.ic_menu_stop);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_refresh\", android.R.drawable.ic_menu_refresh);\r\n\t\t\t\tsystemIcons.put(\"ic_media_play\", android.R.drawable.ic_media_play);\r\n\t\t\t\tsystemIcons.put(\"ic_media_ff\", android.R.drawable.ic_media_ff);\r\n\t\t\t\tsystemIcons.put(\"ic_media_pause\", android.R.drawable.ic_media_pause);\r\n\t\t\t\tsystemIcons.put(\"ic_media_rew\", android.R.drawable.ic_media_rew);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_edit\", android.R.drawable.ic_menu_edit);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_close_clear_cancel\", android.R.drawable.ic_menu_close_clear_cancel);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_save\", android.R.drawable.ic_menu_save);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_mark\", android.R.drawable.ic_menu_mark);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_back\", android.R.drawable.ic_menu_back);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_forward\", android.R.drawable.ic_menu_forward);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_help\", android.R.drawable.ic_menu_help);\r\n\t\t\t\t//systemIcons.put(\"ic_menu_home\", android.R.drawable.ic_menu_home);\r\n\t\t\t\tsystemIcons.put(\"ic_media_next\", android.R.drawable.ic_media_next);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_preferences\", android.R.drawable.ic_menu_preferences);\r\n\t\t\t\tsystemIcons.put(\"ic_media_previous\", android.R.drawable.ic_media_previous);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_revert\", android.R.drawable.ic_menu_revert);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_send\", android.R.drawable.ic_menu_send);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_share\", android.R.drawable.ic_menu_share);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_view\", android.R.drawable.ic_menu_view);\r\n\t\t\t\tsystemIcons.put(\"ic_menu_zoom\", android.R.drawable.ic_menu_zoom);\r\n\t\t\t}\r\n{code}\r\n\r\nIn github, the file is in: \r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java#L103\r\n\r\nh4. HD discussion\r\nhttp://support-admin.appcelerator.com/display/APP-489622\r\n", "attachment": [], "flagged": false, "summary": "Android: Making more drawables available in the platform", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "closedSprints": [ { "id": 517, "state": "closed", "name": "2015 Sprint 22 SDK", "startDate": "2015-10-24T00:30:42.059Z", "endDate": "2015-11-07T01:30:00.000Z", "completeDate": "2015-11-09T02:37:29.441Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "190691", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any news on this?\r\n\r\nOr there is any way to overcome this from javascript or a module without recompiling the sdk?\r\nThank you.", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-04-12T04:53:21.000+0000", "updated": "2012-04-12T04:53:21.000+0000" }, { "id": "192493", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "The Customer needs this feature within two weeks. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-04-24T16:30:24.000+0000", "updated": "2012-04-24T16:30:24.000+0000" }, { "id": "291929", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Seems reasonable. Scheduled it for 3.4.0. If it's easy, we could move it into 3.3.0.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-07T18:03:59.000+0000", "updated": "2014-02-07T18:03:59.000+0000" }, { "id": "352264", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I've asked [~jhaynie] since GitHub says he's to blame ;)\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/commit/a90cd6dd0b5c124b7a6f0157522e93e659c06527#commitcomment-11155327", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-05-12T14:00:20.000+0000", "updated": "2015-05-12T14:00:20.000+0000" }, { "id": "363885", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Just more information on this. Google has cool new design icons with material look and feel.\r\nhttps://www.google.com/design/icons/\r\n\r\nI don't think it should be built into the Titanium SDK and the user should instead download what they need from there and use it.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-15T03:28:05.000+0000", "updated": "2015-09-15T03:28:05.000+0000" }, { "id": "364048", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I'll be marking this as 'won't fix' if Ash's proposal makes more sense. \r\nPlease let me know before end of sprint if anyone feels otherwise.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-16T07:39:04.000+0000", "updated": "2015-09-16T07:39:04.000+0000" }, { "id": "364075", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "It's not that these icons are built into the Ti SDK. These constants refer to system icons, built into the Android OS and typically themed by the handset manufacturer (to match their skin, i.e. TouchWiz). They provide a common set of icons to use across devices without the need for the app developer to create icon files in multiple resolutions, bundle those assets into his/her app (increasing APK size), and have to worry about skinning issues (default system colors, which might make an external icon poorly visible in some manufacturer's skin theme). \r\n\r\nWhat is in the Ti SDK is a set of constants that map to the Android constants which point to the actual resources installed on the user's device. All that needs to change here is to update (un-comment) that list of constants to be sure the Ti SDK maps 1-1 to the Android constants.\r\n\r\nI believe this is a separate matter than downloading and using Google's new icon set.\r\n\r\nNow, if you really wanted to make things convenient for the Ti developer, you would include these new Google icons in the Ti tooling but not bundle them into the APK automatically unless the developer used one of them via some new constant or mechanism you create. That would be _in addition_ to exposing all of the drawables constants, though.", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-09-16T12:21:02.000+0000", "updated": "2015-09-16T12:22:16.000+0000" }, { "id": "364080", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~skypanther] is right that these icons exist on the user's device anyway and all we do is expose the constants, so it doesn't bloat the sdk/api in any way.\r\n\r\nWe should just change the logic here:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java#L169-L175\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java#L409-L416\r\n\r\nTo do a dynamic lookup with {{android.R.drawable}} instead of the static map here:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiFileHelper.java#L95-L125\r\n\r\nThen we never have to worry about it again.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-16T14:03:25.000+0000", "updated": "2015-09-16T14:03:25.000+0000" }, { "id": "364147", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Just checked on the commented out variables. They don't exists in the Android sdk. https://developer.android.com/reference/android/R.drawable.html\r\n\r\nThat's why they were commented out.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-17T03:12:19.000+0000", "updated": "2015-09-17T03:12:19.000+0000" }, { "id": "364189", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "Ah, sorry, I didn't do such a comparison. In the end, Ti should have constants for all the drawables that do exist for the Ti-supported Android API levels. See http://androiddrawables.com/ for a visual list. If what it has already is the full list, that would make this ticket invalid.", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-09-17T12:03:21.000+0000", "updated": "2015-09-17T12:03:21.000+0000" }, { "id": "364193", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "It does not have the full list (https://developer.android.com/reference/android/R.drawable.html) and because of the constants changes Android does I suggest we map them dynamically somehow.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-17T13:00:52.000+0000", "updated": "2015-09-17T13:00:52.000+0000" }, { "id": "364274", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I agree that dynamically might be the best way, since, as Fokke mentioned, the drawables change based on the Android version.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-09-18T02:32:39.000+0000", "updated": "2015-09-18T03:03:26.000+0000" }, { "id": "368571", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "The set of icons disabled across Android releases is *intentional*. Read this https://groups.google.com/forum/#!topic/android-developers/2rvmKqG1TBM\r\n\r\nSo Google actually recommends copying the icons to the app and use them (they don't seem concerned if the apk gets a little fatty). The real problem I see here is how do you maintain this across future releases? For example, ic_menu_refresh is completely removed from Android 23 SDK resources. If we dynamically add these icons, then we are bound to support it for future releases and in some case there is no icon to copy from (and we cannot copy icons from older Android resources since they have different look and feel). Commenting out these icons is in accordance to platform behaviour. If developer wants they can copy over to res and use them. \r\n\r\nSo lets relook if we should really support these icons in a unrecommended way.", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-02T04:40:37.000+0000", "updated": "2015-11-02T04:40:37.000+0000" }, { "id": "368591", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Mmm, makes sense. But then we might even consider deprecating (without any intention to ever remove) {{Ti.Android.R.drawable}} and add a note that this is considered a bad practice by Google.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-02T08:26:17.000+0000", "updated": "2015-11-02T08:26:17.000+0000" }, { "id": "368632", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "I see your point on this change and agree the ticket as originally written should not be implemented. \r\n\r\nBut, how about at least making it easy and reliable to use density-specific image assets on Android? The current documentation is a jumbled and confusing mess. Cripe, I wrote 90% of what's in those docs and I still find that it's nearly random luck that I get the images into the right folder in the right spot to get them to actually work! Developers need to decipher whether images go in platform/android/res, or app/assets/android, or app/assets/android/images, and are those folders named res-high or res-hdpi or res-drawable-hdpi etc. Not to mention needing to know what dimensions and dpi each of those resolutions should be. The explanations for all that are spread all over, and somewhat contradictorily covered in the docs. \r\n\r\nClear documentation and a good example would help a lot. But how about a tool in Studio that puts the graphics in the right spot for you. Even better, a generator that you feed some high resolution version which then generates all the correct down-res'd versions you need. For icons, how about some import tool that lets you go out to Google's icon repository, select the icons you want, and then downloads them and puts them in the right folders. There are lots of things that could be done to make this process easier.\r\n\r\n", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-11-02T14:03:32.000+0000", "updated": "2015-11-02T14:03:32.000+0000" }, { "id": "368634", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Come on [~timpoulsen], you can do better! That's not a rant, that's a bunch of good ideas! :D\r\n\r\nI must say I've never gotten confused with the place or folder-name of images. I always just use {{app/assets/android/images/res-}} unless I'm told otherwise (launch image, icon...)", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-02T14:15:24.000+0000", "updated": "2015-11-02T14:15:24.000+0000" }, { "id": "368950", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Marking ticket as won't fix, and creating a new one to address deprecation documentation.\r\nThanks [~skypanther], will definitely look into your comments as a separate ticket.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-04T06:57:19.000+0000", "updated": "2015-11-04T06:57:19.000+0000" }, { "id": "415472", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as Won't Fix with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T22:37:32.000+0000", "updated": "2017-03-23T22:37:32.000+0000" } ], "maxResults": 20, "total": 20, "startAt": 0 } } }