{ "id": "132628", "key": "TIMOB-17272", "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-07-04T10:06:47.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-3.3.0" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:46.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": "Toggling the background image when the background color is set to null does not remove the background image.\r\nThis is not a regression as it also occurs on 3.2.3. GA\r\n\r\nSteps to reproduce:\r\nInstall and run the code at the bottom\r\n1.Click on the ‘TOGGLEBGIMAGE’ button \r\n2.Click on the ‘TOGGLEBGCOLOR’ button \r\n3.Click on the ‘TOGGLEBGCOLOR’ button the second time\r\n4. Click on the ‘TOGGLEBGIMAGE’ button \r\n\r\nExpected result:\r\n1.The background image should appear \r\n2. The background color should change to orange \r\n3. The background color should be removed\r\n4. The background image should be removed\r\n\r\nActual result:\r\n1.The image appears on the first click \r\n2.The background color changes to orange \r\n3.The background color is removed\r\n4.The background image is not removed.\r\n\r\n{code}\r\n\r\nvar _window = Titanium.UI.createWindow({ \r\n title:'ToggleBG',\r\n backgroundColor: 'white'\r\n});\r\n\r\n_window.modal = false ;\r\n\t\t_window.exitOnClose = false ;\r\n\t\t \r\n\t\tvar btn1 = Ti.UI.createButton({\r\n\t\t top:10,\r\n\t\t title:'TOGGLE BGIMAGE'\r\n\t\t});\r\n\t\tvar btn2 = Ti.UI.createButton({\r\n\t\t \r\n\t\t title:'TOGGLE BGCOLOR'\r\n\t\t});\r\n\t\t \r\n\t\t_window.add(btn1);\r\n\t\t_window.add(btn2);\t\t \r\n\r\n\t\t \r\n\t\tvar hasImage = false;\r\n\t\tvar hasColor = false;\r\n\t\t \r\n\t\tbtn1.addEventListener('click',function(){\r\n\t\t if(hasImage == false) {\r\n\t\t _window.backgroundImage = 'KS_nav_views.png';\r\n\t\t }\r\n\t\t else {\r\n\t\t _window.backgroundImage = null;\r\n\t\t }\r\n\t\t hasImage = !hasImage;\r\n\t\t});\r\n\t\tbtn2.addEventListener('click',function(){\r\n\t\t if(hasColor == false) {\r\n\t\t _window.backgroundColor = 'orange';\r\n\t\t }\r\n\t\t else {\r\n\t\t _window.backgroundColor = null;\r\n\t\t }\r\n\t\t hasColor = !hasColor;\r\n\t\t});\r\n_window.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Unable to toggle the background image of a window when background color is null", "creator": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "vchidambaram", "key": "vchidambaram", "displayName": "Visalakshi Chidambaram", "active": true, "timeZone": "Asia/Shanghai" }, "environment": "Titanium SDK: 3.3.0.20140702175712\r\nTitanium Studio: 3.3.0.201406271151\r\nCLI: 3.3.0-rc4\r\nDevice : Samsung Galaxy S5 (v4.4.2) \r\nWindows 8", "comment": { "comments": [ { "id": "319898", "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\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", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-22T10:30:04.000+0000", "updated": "2014-08-22T10:30:04.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }