{ "id": "83790", "key": "AC-2940", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2011-12-26T03:47:07.000+0000", "created": "2011-12-14T05:11:09.000+0000", "labels": [ "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updated": "2016-03-08T07:47:56.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I'm trying to use a backgroundImage property on several buttons and views, and have each as a set of density specific images (/Resources/android/images/res-*dpi/image.png) as well as a default /Resouces/images/image.png. In SDK 1.7.5 this works fine but if I use any version higher that this the density images are ignored and the default is always used.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor: '#604040',\r\n\tlayout: 'vertical'\r\n});\r\n\r\nvar image = Ti.UI.createImageView({\r\n\timage: '/images/test.png',\r\n\ttop: '20dp',\r\n\twidth: '108dp',\r\n\theight: '84dp'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\tbackgroundImage: '/images/test.png',\r\n\ttop: '20dp',\r\n\twidth: '108dp',\r\n\theight: '84dp'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\tbackgroundImage: '/images/test.png',\r\n\ttop: '20dp',\r\n\twidth: '108dp',\r\n\theight: '84dp'\r\n});\r\n\r\nwin.add(image);\r\nwin.add(button);\r\nwin.add(view);\r\n\r\nwin.open();\r\n{code}\r\n\r\n\r\nRunning the attached project (above) on 1.7.5 shows me the same 3 *DPI images as expected, but anything above that shows the top image properly (it uses an image property), and the bottom 2 show the 'default' image (these use backgroundImage).\r\n\r\nI don't think I'm doing anything special, and I've tried every combination of OS, Javascript runtime, Android SDK, Ti SDK, emulator size, fastdev etc I can think of.\r\nThe earliest CI build I've tried is 1.7.6.v2011120913042, also 1.8.0.1.RC1 and many 1.8/1.9 CI builds up to 1.9.0.v20111214004742.", "attachment": [ { "id": "24647", "filename": "1.7.5.jpg", "author": { "name": "linfox", "key": "linfox", "displayName": "Paul Semczuk", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-14T05:11:09.000+0000", "size": 127462, "mimeType": "image/jpeg" }, { "id": "24648", "filename": "1.7.6.and.up.jpg", "author": { "name": "linfox", "key": "linfox", "displayName": "Paul Semczuk", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-14T05:11:09.000+0000", "size": 127380, "mimeType": "image/jpeg" }, { "id": "24649", "filename": "test.zip", "author": { "name": "linfox", "key": "linfox", "displayName": "Paul Semczuk", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-14T05:11:09.000+0000", "size": 39935, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: Density-specific backgroundImage is being ignored", "creator": { "name": "linfox", "key": "linfox", "displayName": "Paul Semczuk", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "linfox", "key": "linfox", "displayName": "Paul Semczuk", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio 1.0.7.201112132151 (win & mac)\r\nAndroid emulator (any size) and htc desire\r\nSDK 1.7.6 (12/09/11 01:30 c0d8707...) and above", "comment": { "comments": [ { "id": "177178", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Paul\r\n\r\nThank you for raising this ticket, particularly as it is so well-formed.\r\n\r\nWhen using platform-specific folders, I don't think the {{/images/}} folder is necessary, and removing it will resolve the issue (it does in my tests). Search for the term \"default folder\" in [Using density-specific resources on Android|https://wiki.appcelerator.org/display/guides/Using+density-specific+resources+on+Android].\r\n\r\nI will close this for now. Please reopen the ticket if this does not resolve it for you. If you do, please state the exact screens that you have tested.\r\n\r\nCheers", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-26T03:46:59.000+0000", "updated": "2011-12-26T03:46:59.000+0000" }, { "id": "183534", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist] to ensure that we can escalate it quickly. Read [How to Submit a Bug Report|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report] if you have not read it before, and always start a ticket using the [JIRA Ticket Template|https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template].\r\n\r\nThanks in advance", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-02-17T02:23:01.000+0000", "updated": "2012-02-17T02:23:01.000+0000" }, { "id": "185152", "author": { "name": "meinmotion", "key": "meinmotion", "displayName": "Remko Posthuma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please re-open this doesn't work in 1.8.2 to", "updateAuthor": { "name": "meinmotion", "key": "meinmotion", "displayName": "Remko Posthuma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-06T08:58:17.000+0000", "updated": "2012-03-06T08:58:17.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }