{ "id": "128594", "key": "TIMOB-16816", "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": [], "resolution": null, "resolutiondate": null, "created": "2014-04-02T11:02:45.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "bug", "cb-tooling" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [ { "id": "53882", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "outwardIssue": { "id": "150049", "key": "TIMOB-19298", "fields": { "summary": "Develop a Titanium Asset Management System", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "37689", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "130570", "key": "AC-1676", "fields": { "summary": "default.png isn't shown if it's set as background image", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-01-04T18:05:23.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When trying to create an ImageView, you cannot use the splashscreen images (default.png) on Android. The usecase is a dynamic loading screen that is displayed while the app is starting up. This loading screen must have the splash image as the background so it looks like the default splash screen of the app.\r\n\r\nNeither the standard default.png nor the density-specific images can be referenced to use as background for the window or image parameter for an ImageView.\r\n\r\nThe warning in the console is:\r\n[WARN] : TiDrawableReference: (pool-3-thread-1) [1889,1889] Could not open stream to get bitmap\r\n\r\nA workaround is to duplicate every default.png in every folder, and rename it to something else (default2.png or test.png for instance). Then it does find the resource.\r\n\r\nTestcase:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#ffffff',\r\n\tnavBarHidden : true,\r\n\texitOnClose : true\r\n});\r\nvar view = Ti.UI.createView({ backgroundColor: \"#fdd\" });\r\n\r\nvar imgView = Ti.UI.createImageView({\r\n\timage: '/images/default.png',\r\n\twidth: 150,\r\n\theight: 150\r\n});\r\nview.add(imgView);\r\n\r\nwin.add(view);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Cannot refer default splash screen image (default.png) for image view", "creator": { "name": "tmil", "key": "tmil", "displayName": "Thijs van Mil", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "tmil", "key": "tmil", "displayName": "Thijs van Mil", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium Studio & sdk - 3.2.0", "comment": { "comments": [ { "id": "299994", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with the provided test case. Same test works fine on iOS platform.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-06T06:33:38.000+0000", "updated": "2014-04-06T06:33:38.000+0000" }, { "id": "300414", "author": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "body": "While not an appropriate solution to this problem, because of how resources are looked up you can use: `Ti.App.Android.R.drawable.background` to access the splash. While not the best, in the meantime this is a solution.", "updateAuthor": { "name": "animecyc", "key": "animecyc", "displayName": "Seth Benjamin", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-09T20:22:27.000+0000", "updated": "2014-04-09T20:22:27.000+0000" }, { "id": "320978", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces\r\n\r\nTitanium SDK version 3.4.0 master, 3.3.0.GA, 3.2.3.GA, 3.2.2.GA\r\nTitanium Studio, build: 3.3.0.201407100905\r\nTitanium Command-Line Interface\r\nCLI version 3.3.0, \r\nAndroid device : Motorola Moto G, Android version : 4.4.4\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-29T07:22:03.000+0000", "updated": "2014-08-29T07:22:03.000+0000" }, { "id": "404093", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This behavior has been around a long time and it is by design (and not the good kind). We have discussed a Titanium Asset Management system that will separate out system managed resources (such as splash screens) from Titanium controlled assets (i.e. Resources/images). View TIMOB-19298 for more information.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2017-01-04T18:05:05.000+0000", "updated": "2017-01-04T18:05:05.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }