{ "id": "92033", "key": "TIMOB-9209", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15104", "description": "2013 Sprint 03 API", "name": "2013 Sprint 03 API", "archived": true, "released": true, "releaseDate": "2013-02-11" }, { "id": "14813", "description": "2013 Sprint 03", "name": "2013 Sprint 03", "archived": true, "released": true, "releaseDate": "2013-02-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-02-05T23:16:47.000+0000", "created": "2012-05-20T07:50:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "community", "module_window", "parity", "qe-manualtest" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-08T23:47:44.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": "So I was trying to repeat a background, which always works. But when using density images (xhdpi, hdpi etc...) it's not working. It returns a black view.\r\nTo reproduce:\r\nPut an image in your Resources directory, according to the docs: https://wiki.appcelerator.org/display/guides/Using+density-specific+resources+on+Android\r\n\r\nI have this code:\r\n{code:title=app.js|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n\tnavBarHidden : true,\r\n\texitOnClose : true\r\n});\r\nvar logo = Ti.UI.createView({\r\n\tleft : 0,\r\n\ttop : 0,\r\n\tright : 0,\r\n\theight : \"44dp\",\r\n\tzIndex : 3,\r\n\tbackgroundImage : \"/images/barbg.png\",\r\n backgroundRepeat : true\r\n});\r\nwin.add(logo);\r\nwin.open();\r\n{code}\r\nThe view will be black instead of a repeated image.\r\n\r\nThanks!", "attachment": [], "flagged": false, "summary": "Android: backgroundRepeat returns black view when using density images (xhdpi, hdpi etc...)", "creator": { "name": "peterwilli", "key": "peterwilli", "displayName": "Peter Willemsen", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "peterwilli", "key": "peterwilli", "displayName": "Peter Willemsen", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ubuntu 12.04 64 Bit, Latest Ti Studio. Ti SDK 2.0GA2\r\nTiSDK 3.0.0.GA\r\nSamsung Galaxy SII\r\nAndroid 4.0 (SGS2)", "comment": { "comments": [ { "id": "195572", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Peter,\r\n\r\nCould you provide another code snippet that reproduces the problem? There are some errors in the code that you have included.\r\n\r\nThanks,\r\nBetty", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-22T05:46:06.000+0000", "updated": "2012-05-22T05:46:06.000+0000" }, { "id": "195573", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-22T06:22:23.000+0000", "updated": "2012-05-22T06:22:23.000+0000" }, { "id": "195576", "author": { "name": "peterwilli", "key": "peterwilli", "displayName": "Peter Willemsen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Paul,\r\n\r\nOops, no I'm very sorry. I totally missed that. I'll remember the next time.\r\nI changed the code. It looked normal in the edit window :(\r\n\r\nAnyway, yes I tested it myself by moving the images outside the hdpi folder into the /Resources/ folder, and it works. I'm using it right now as a temporary workaround.", "updateAuthor": { "name": "peterwilli", "key": "peterwilli", "displayName": "Peter Willemsen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-22T06:45:45.000+0000", "updated": "2012-05-22T06:45:45.000+0000" }, { "id": "195816", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "happening for me as well. There really isn't a perfect test case with a default app as you need to have images that will tile in the android resources folders. \r\n\r\nAndroid w/2.0.1.GA2\r\n\r\nFirst off you can't repeat on Heavy Weight windows at all\r\n\r\nNote this is lightweight and works as expected:\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'tiling bug',\r\n backgroundImage: \"KS_nav_ui.png\",\r\n backgroundRepeat: true\r\n}).open();\r\n{code}\r\n\r\nThis is heavyweight and ignores the repeat property:\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'tiling bug',\r\n backgroundImage: \"KS_nav_ui.png\",\r\n backgroundRepeat: true,\r\n navBarHidden: false\r\n}).open();\r\n{code}\r\n\r\n\r\nNow as a base case take this piece of code which works as expected:\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'tiling bug',\r\n\tbackgroundColor: 'red',\r\n navBarHidden: false\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n backgroundImage: \"KS_nav_ui.png\",\r\n backgroundRepeat: true,\r\n width: \"100%\",\r\n height: \"100%\"\r\n});\r\n\r\nwin.add(view)\r\nwin.open();\r\n{code}\r\n\r\n\r\nNow move (don't just copy) \"KS_nav_ui.png\" to the resolution specific image folders.\r\n\r\nRun with this slight modification of the image location to reference the images folder:\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'tiling bug',\r\n\tbackgroundColor: 'red',\r\n navBarHidden: false\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n backgroundImage: \"images/KS_nav_ui.png\",\r\n backgroundRepeat: true,\r\n width: \"100%\",\r\n height: \"100%\"\r\n});\r\n\r\nwin.add(view)\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2012-05-23T13:05:17.000+0000", "updated": "2012-07-05T07:20:00.000+0000" }, { "id": "195821", "author": { "name": "peterwilli", "key": "peterwilli", "displayName": "Peter Willemsen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'll make a nice template with some random images to let users reproduce this bug.", "updateAuthor": { "name": "peterwilli", "key": "peterwilli", "displayName": "Peter Willemsen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-23T13:49:32.000+0000", "updated": "2012-05-23T13:49:32.000+0000" }, { "id": "201553", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "This is actually more then just android. Occurs with iOS as well with retina and the @2x images. When trying to tile with both the regular image and the @2x on a retina device, the image will just stretch rather then tile. The only exception to this so far i found is with tableviews for some reason. Though i can't tell if perhaps the tableview is just ignoring the @2x and using the regular image, or is tiling the image appropriately.", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2012-07-05T07:17:24.000+0000", "updated": "2012-07-05T07:17:24.000+0000" }, { "id": "221851", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any news on this?\r\nThank you.", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-10-03T08:51:56.000+0000", "updated": "2012-10-03T08:51:56.000+0000" }, { "id": "236636", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/3826\nFor FR, please run the three test cases attached below. Note: put \"image.png\" in /Resources/android/images/[high|medium|low]/\nTest case 1:\n{code}\nvar win = Titanium.UI.createWindow({ \n title:'tiling bug',\n backgroundImage: \"images/image.png\",\n backgroundRepeat: true,\n navBarHidden: false\n}).open();\n{code}\nTest case 2:\n{code}\nvar win = Titanium.UI.createWindow({ \n title:'tiling bug',\n backgroundImage: \"images/image.png\",\n backgroundRepeat: true\n}).open();\n{code}\nTest case 3:\n{code}\nvar win = Titanium.UI.createWindow({ \n title:'tiling bug',\n backgroundColor: 'red',\n navBarHidden: false\n});\n\nvar view = Ti.UI.createView({\n backgroundImage: \"images/image.png\",\n backgroundRepeat: true,\n width: \"100%\",\n height: \"100%\"\n});\n\nwin.add(view)\nwin.open();\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-30T19:43:20.000+0000", "updated": "2013-01-30T19:43:20.000+0000" }, { "id": "242409", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "backgroundRepeat property is working as expected. Tested by executing the above three testcases.\r\n\r\nVerified on:\r\nDevice : Google Nexus, Android Version: 4.1\r\nSDK version: 3.1.0.v20130314163255\r\nCLI version : 3.0.24\r\nOS : MAC OSX 10.7.5\r\nXCode : 4.5.1\r\n", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-15T07:16:21.000+0000", "updated": "2013-03-15T07:16:21.000+0000" }, { "id": "252711", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can someone verify that this is also working on alloy? In my case its using the normal image and not the one out of the res-notlong-* folder: \r\nhttps://developer.appcelerator.com/question/152480/android-backgroundimage-repeat-ignoring-retina-images\r\n\r\nSDK: 3.1.0 GA\r\nAndroid 4.0.2 (device and emulator)\r\n", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-18T12:37:57.000+0000", "updated": "2013-05-18T12:37:57.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }