{ "id": "63836", "key": "TIMOB-3204", "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": "11257", "description": "", "name": "Sprint-2011-09", "archived": true, "released": true, "releaseDate": "2011-03-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:01:10.000+0000", "created": "2011-04-15T03:39:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "release-1.7.0", "reported-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:01:10.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": "{html}
iOS supports both Titanium.UI.backgroundImage and\nTitanium.UI.backgroundColor. Android only supports backgroundColor.\nI also looked at UIModule.java to verify that setBackgroundColor\nexists, but setBackgroundImage does not exist (therefore, it is not\nimplemented).
\nAdd support for backgroundImage to Android, and clarify this\nfeature in the documentation.
\n\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI-...
\nThe following will show a red background with a transparent\nbackground over it for iOS. Android only shows a red background.\nAlso note that if you comment out the background color, nothing\nwill show up for Android.
\n\nTi.UI.backgroundColor = '#f00';\nTi.UI.backgroundImage = 'KS_nav_ui.png';\n\nvar win = Ti.UI.createWindow();\nwin.open();
\n
\n(from [5de2dcddcbd74b349e3e766574eba80a40151d6a])\nSupport backgroundImage on root UI view. Document\nUI.backgroundImage and UI.backgroundColor. [#3204\nstate:fixed-in-qa] \nhttps://github.com/appcelerator/titanium_mobile/commit/5de2dcddcbd7...
Tested with Titanium SDK version: 1.7.0 (03/04/11 12:06 87eb210)\non
\nEmulator 2.1
\nGalazy Tab 2.2
\niPhone 4 4.2.1
(from [cef1964e701d64deff2ba2590fe2bee49fed88a4])\nSupport backgroundImage on root UI view. Document\nUI.backgroundImage and UI.backgroundColor. [#3204\nstate:fixed-in-qa]
\nresolved Conflicts:
\n\nandroid/modules/ui/src/ti/modules/titanium/ui/UIModule.java
\n
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/cef1964e701d...
set back to \"resolved\" (was set back to fixed-in-qa by agent\nafter cherry pick)
Hi Guys,
\nit works now to put a background image to the root view, but\nunfortunately it is only possible to set the background when using\nno tab group or windows. On the iPhone I use the same code with a\ntab group and can see the background, in Android I can't. Is this\ndue to a technical reason or an unwanted inconsistency?
\nThank you very much
Interesting, so you are using tabs without setting their\n\"window\" property, is that right? Because I guess if you set the\ntab's window property, that window's background would cover the\ndefault (root) background.
\nIn our Android implementation, I notice if I try to not\nset a tab's window property, then the app crashes. (It expects that\na tab carries a window).
\nIf I'm misinterpreting, maybe you could paste some sample code\nhere.
Hi Bill,
\nI am actually using the window property of tabs
\n\ntabsObject['lists'] = Ti.UI.createTab({\n icon : Titanium.Filesystem.resourcesDirectory + '/images/tab-lists.png',\n title : wunderlist.language.data.lists,\n type : 'lists',\n window : tabs.createWindow('lists')\n});
\n
\ntabs.createWindow() returns a window like that:
\n\ntabsWindow = Ti.UI.createWindow({\n url : Titanium.Filesystem.resourcesDirectory + '/js/windows/lists.js',\n backgroundColor : 'transparent'\n});
\n
\nI am always setting the backgroundColor to 'transparent' so that\nthe background isn't visible.
Hi Dennis,
\nThere's a new ticket to follow: #3290 . It\nwill be finished during the day Tuesday. I've already got a working\nprototype.
\nThanks,
\nBill
Hi Bill,
\nthat's just awesome :)
\nThank you very much for your help!
Kind reagards,
\nDennis