{ "id": "107048", "key": "TIMOB-12148", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-04-01T21:32:14.000+0000", "created": "2012-12-22T01:31:38.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_actionbar", "qe-closed-3.3.0", "qe-testadded" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "24128", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "107365", "key": "TIMOB-12204", "fields": { "summary": "Crash when accessing ActionBar on non-ActionBar window ", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "34439", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "124894", "key": "TIMOB-16212", "fields": { "summary": "Android: ActionBar expose setDisplayShowHomeEnabled and setDisplayShowTitleEnabled", "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" } }, "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 } } } } ], "assignee": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-07-29T07:28:05.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": "When setting the actionBar.backgroundImage property from a window's \"open\" event handler, the change takes effect immediately. However, when setting the background from a click event handler, the change does _not_ take effect.\r\n\r\nIf you subsequently set the action bar's title property, the previous backgroundImage change takes effect. In addition, when setting one of the actionBar properties, the following message is logged:\r\n\r\n[ERROR][Proxy ( 1017)] Unable to lookup Proxy.prototype.setProperty\r\n\r\nTest code:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\ttitle : \"Old Title\",\r\n\tnavBarHidden : false,\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle : \"Set Background\"\r\n});\r\n\r\nvar b2 = Ti.UI.createButton({\r\n\ttitle : \"Set Title\"\r\n});\r\n\r\nvar actionBar;\r\n\r\nwin.add(b1);\r\nwin.add(b2);\r\n\r\nb1.addEventListener(\"click\", function() {\r\n\tif (actionBar) {\r\n\t\tactionBar.backgroundImage = \"/bg.png\";\r\n\r\n\t} else {\r\n\t\tTi.API.warn(\"Action bar not available.\");\r\n\t}\r\n});\r\n\r\nb2.addEventListener(\"click\", function() {\r\n\tif (actionBar) {\r\n\t\tactionBar.title = \"New Title\";\r\n\r\n\t} else {\r\n\t\tTi.API.warn(\"Action bar not available.\");\r\n\t}\r\n\r\n})\r\nwin.addEventListener(\"click\", function() {\r\n\tif (Ti.Platform.osname === \"android\") {\r\n\t\tif (! win.activity) {\r\n\t\t\tTi.API.error(\"Can't access action bar on a lightweight window.\");\r\n\t\t}\r\n\t\tactionBar = win.activity.actionBar;\r\n\t}\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nTo reproduce: Create a project, set up to build with targetSdkVersion=11 or higher and api-tool-level 14 or higher. Run app.\r\n\r\nClick \"Set Background\", then \"Set Title\". Note that background doesn't get set when you click Set Background, but DOES get set when you click \"Set Title.\"\r\n\r\nSometimes you need to repeat this cycle once or twice before the background appears.\r\n\r\nAfter the background has been set, clicking \"Set Background\" again causes the background to disappear, although no change should be evident.\r\n", "attachment": [ { "id": "34324", "filename": "bg.png", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-22T01:34:53.000+0000", "size": 7626, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Action Bar backgroundImage isn't set properly in click event handlers.", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "262961", "author": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "body": "PR :- \r\nhttps://github.com/appcelerator/titanium_mobile/pull/4480", "updateAuthor": { "name": "bijuexalture", "key": "bijuexalture", "displayName": "Biju pm", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-07-24T09:52:31.000+0000", "updated": "2013-07-24T09:52:31.000+0000" }, { "id": "302363", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified fix using below code and environment:\r\n\r\nAppc Studio: 3.3.0.201404211130\r\nSDK build: 3.3.0.v20140423155715\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy: 1.4.0-dev\r\nCLI: titanium-3.3.0-dev\r\ntitanium-code-processor:1.1.1-beta1\r\nXcode: 5.1.1\r\nOsx: Mavericks(10.9.2)\r\nDevice: Nexus 5(4.4.2)\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n title : \"Old Title\",\r\n navBarHidden : false,\r\n layout : 'vertical'\r\n});\r\n \r\nvar b1 = Ti.UI.createButton({\r\n title : \"Set Background\"\r\n});\r\n \r\nvar b2 = Ti.UI.createButton({\r\n title : \"Set Title\"\r\n});\r\n \r\nvar actionBar;\r\n \r\nwin.add(b1);\r\nwin.add(b2);\r\n \r\nb1.addEventListener(\"click\", function() {\r\n if (actionBar) {\r\n actionBar.backgroundImage = \"/bg.png\";\r\n \r\n } else {\r\n Ti.API.warn(\"Action bar not available.\");\r\n }\r\n});\r\n \r\nb2.addEventListener(\"click\", function() {\r\n if (actionBar) {\r\n actionBar.title = \"New Title\";\r\n \r\n } else {\r\n Ti.API.warn(\"Action bar not available.\");\r\n }\r\n });\r\n win.addEventListener(\"open\", function() {\r\n if (Ti.Platform.osname === \"android\") {\r\n if (! win.activity) {\r\n Ti.API.error(\"Can't access action bar on a lightweight window.\");\r\n }\r\n actionBar = win.activity.actionBar;\r\n }\r\n\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nActionBar BackgroundImage is working as expected. Hence closing the issue.", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-24T09:45:20.000+0000", "updated": "2014-04-24T09:45:20.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }