{ "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}

Problem

\n

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).

\n

Solution

\n

Add support for backgroundImage to Android, and clarify this\nfeature in the documentation.

\n

Associated Documentation

\n

\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI-...

\n

Sample Code

\n

The 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

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/75321

{html}", "attachment": [], "flagged": false, "summary": "Android: Titanium.UI.backgroundImage Not Implemented", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "130278", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:39:24.000+0000", "updated": "2011-04-15T03:39:24.000+0000" }, { "id": "130279", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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

{html}", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:24.000+0000", "updated": "2011-04-15T03:39:24.000+0000" }, { "id": "130280", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [cef1964e701d64deff2ba2590fe2bee49fed88a4])\nSupport backgroundImage on root UI view. Document\nUI.backgroundImage and UI.backgroundColor. [#3204\nstate:fixed-in-qa]

\n

resolved Conflicts:

\n
\nandroid/modules/ui/src/ti/modules/titanium/ui/UIModule.java\n
\n

\nhttps://github.com/appcelerator/titanium_mobile/commit/cef1964e701d...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:39:25.000+0000", "updated": "2011-04-15T03:39:25.000+0000" }, { "id": "130281", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

set back to \"resolved\" (was set back to fixed-in-qa by agent\nafter cherry pick)

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:39:25.000+0000", "updated": "2011-04-15T03:39:25.000+0000" }, { "id": "130282", "author": { "name": "dennisschneider", "key": "dennisschneider", "displayName": "Dennis Schneider", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi Guys,

\n

it 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?

\n

Thank you very much

{html}", "updateAuthor": { "name": "dennisschneider", "key": "dennisschneider", "displayName": "Dennis Schneider", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:25.000+0000", "updated": "2011-04-15T03:39:25.000+0000" }, { "id": "130283", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

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.

\n

In 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).

\n

If I'm misinterpreting, maybe you could paste some sample code\nhere.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:39:26.000+0000", "updated": "2011-04-15T03:39:26.000+0000" }, { "id": "130284", "author": { "name": "dennisschneider", "key": "dennisschneider", "displayName": "Dennis Schneider", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi Bill,

\n

I 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
\n

tabs.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
\n

I am always setting the backgroundColor to 'transparent' so that\nthe background isn't visible.

{html}", "updateAuthor": { "name": "dennisschneider", "key": "dennisschneider", "displayName": "Dennis Schneider", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:26.000+0000", "updated": "2011-04-15T03:39:26.000+0000" }, { "id": "130285", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Hi Dennis,

\n

There's a new ticket to follow: #3290 . It\nwill be finished during the day Tuesday. I've already got a working\nprototype.

\n

Thanks,

\n

Bill

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T03:39:26.000+0000", "updated": "2011-04-15T03:39:26.000+0000" }, { "id": "130286", "author": { "name": "dennisschneider", "key": "dennisschneider", "displayName": "Dennis Schneider", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi Bill,

\n

that's just awesome :)
\nThank you very much for your help!

\n

Kind reagards,
\nDennis

{html}", "updateAuthor": { "name": "dennisschneider", "key": "dennisschneider", "displayName": "Dennis Schneider", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:26.000+0000", "updated": "2011-04-15T03:39:26.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }