{ "id": "123205", "key": "TIMOB-15879", "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": "15715", "description": "2013 Sprint 25", "name": "2013 Sprint 25", "archived": true, "released": true, "releaseDate": "2013-12-13" }, { "id": "15717", "description": "2013 Sprint 25 Core", "name": "2013 Sprint 25 Core", "archived": true, "released": true, "releaseDate": "2013-12-13" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-12-05T07:21:56.000+0000", "created": "2013-12-04T12:06:51.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_imageview", "nine-patch", "qe-testadded", "regression", "triage" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-07-29T20:36:18.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. To reproduce:\r\n\r\n1. Create a project: {{ti create -p android -n nine --id test.nine -d .}}\r\n2. Replace app.js code by:\r\n {code}\r\n var win = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff'\r\n });\r\n\r\n var view = Ti.UI.createView({\r\n width: 100,\r\n height: 100,\r\n backgroundImage: '/images/foo.png'\r\n });\r\n\r\n win.add(view);\r\n\r\n win.open();\r\n {code}\r\n3. Place the attached (or any) image in {{/images/foo.9.png}}\r\n4. Run the project to confirm it works.\r\n5. Move the image to {{/android/images/foo.9.png}}\r\n6. Run the project again to confirm it works.\r\n5. Move the image to {{/android/images/res-mdpi/foo.9.png}} (or any other density-specific folder)\r\n6. Run the project again to confirm it does *not* work.", "attachment": [ { "id": "44361", "filename": "foo.9.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-04T12:06:51.000+0000", "size": 8076, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Nine-patch images not displayed when placed in density-specific folder", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "CLI 3.2.0-beta3\r\nSDK 3.2.0-beta3", "comment": { "comments": [ { "id": "282373", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks. Which version is this a regression against?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-04T13:44:09.000+0000", "updated": "2013-12-04T13:44:09.000+0000" }, { "id": "282374", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Works fine in 3.1.3.GA SDK and 3.1.2 CLI\r\n\r\nIt might be more of a CLI problem? I should test 3.1.3.GA against 3.2.0-beta3 CLI then?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-04T13:48:29.000+0000", "updated": "2013-12-04T13:49:06.000+0000" }, { "id": "282376", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, you should be able to test 3.1.3.GA SDK + 3.2.0-beta3 CLI.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-04T13:51:54.000+0000", "updated": "2013-12-04T13:51:54.000+0000" }, { "id": "282382", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "* Verified working on 3.1.3.GA SDK + 3.2.0-beta CLI\r\n* Verified working on 3.1.3.GA SDK + 3.1.2 CLI\r\n* Verified broken on 3.2.0.v20131126144841 SDK + 3.2.0-beta CLI", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-04T14:55:30.000+0000", "updated": "2013-12-04T14:55:30.000+0000" }, { "id": "282383", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "So the cause seems to be the SDK, not the CLI.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-12-04T14:56:05.000+0000", "updated": "2013-12-04T14:56:05.000+0000" }, { "id": "282385", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks. Moving to a SDK issue.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-04T15:05:21.000+0000", "updated": "2013-12-04T15:06:14.000+0000" }, { "id": "282441", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a CLI issue. Similar to TIMOB-10806, the hash of the nine-patch image is not calculated correctly. From the log\n{code}\nE/TiRHelper(18156): (main) [19,316] Error looking up resource: foo_643a3006c7\nE/TiRHelper(18156): java.lang.NoSuchFieldException: foo_643a3006c7\nE/TiRHelper(18156): \tat java.lang.Class.getDeclaredField(Class.java:631)\nE/TiRHelper(18156): \tat org.appcelerator.titanium.util.TiRHelper.lookupResource(TiRHelper.java:77)\nE/TiRHelper(18156): \tat org.appcelerator.titanium.util.TiRHelper.getResource(TiRHelper.java:105)\n{code}\nwe can see we are looking for the image \"foo_643a3006c7\". But in the build/android/res/drawable-hdpi/ folder, the image name is \"foo_cc63ca97ae.9.png\" if using the master, while the image name is \"foo_643a3006c7.9.png\" if using 3.1.3.GA.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-04T18:58:09.000+0000", "updated": "2013-12-04T18:58:09.000+0000" }, { "id": "282509", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5061\r\n3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5062", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-12-04T23:23:46.000+0000", "updated": "2013-12-05T05:25:27.000+0000" }, { "id": "282582", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Moved image foo.9.png to all three locations as above mentioned \n/images/foo.9.png\n/android/images/foo.9.png\n/android/images/res-mdpi/foo.9.png\n\nImage is getting displayed in all conditions.\n\nVerified fix on:\nDevice : Google Nexus 7, Android Version: 4.3\nSDK: 3.2.0.v20131204220843\nCLI version : 3.2.0-beta\nOS : MAC OSX 10.9\nAlloy: 1.3.0-beta\nACS: 1.0.9\nAppcelerator Studio, build: 3.2.0.201312042306\ntitanium-code-processor: 1.1.0-beta\nXCode : 5.0.2", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-12-05T09:59:00.000+0000", "updated": "2013-12-05T09:59:00.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }