{ "id": "124901", "key": "TIMOB-16353", "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": "15931", "description": "2014 Sprint 05", "name": "2014 Sprint 05", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "id": "15932", "description": "2014 Sprint 05 API", "name": "2014 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2014-03-14" }, { "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-03-07T19:46:55.000+0000", "created": "2014-01-16T22:55:23.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Alloy", "Titanium", "black", "module_window", "qe-closed-3.3.0", "qe-testadded", "transparent", "triage", "window" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "35360", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "126753", "key": "TIMOB-16493", "fields": { "summary": "Android: Let `transparent` or alpha channel trigger transparent background on heavyweight windows", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-07-26T06:00:24.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": "Here is the XML used to generate a transparent window. I don't think that the content matters as long as the content is smaller than the window so that you can see through to the window underneath. Basically I'm creating a transparent window with a list view in it to simulate a popup menu control.\r\n\r\nInstead of seeing the window behind the list view, there is a black background on Android (iOS works fine).\r\n\r\n{code}\r\n\r\n\t\r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\t\r\n\r\n{code}\r\n\r\nI think that this is a bug in Titanium. The generated code seems to look right.\r\n\r\n{code}\r\n $.__views.PopupControl = Ti.UI.createWindow({\r\n backgroundColor: \"transparent\",\r\n barColor: \"gray\",\r\n layout: \"vertical\",\r\n id: \"PopupControl\",\r\n androidback: \"doClose\"\r\n });\r\n{code}\r\n", "attachment": [ { "id": "45263", "filename": "TransparencyIssueAndroid.png", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-21T02:46:47.000+0000", "size": 30420, "mimeType": "image/png" }, { "id": "45264", "filename": "TransparencyIssueNOToniOS.png", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-21T02:46:47.000+0000", "size": 70485, "mimeType": "image/png" }, { "id": "45477", "filename": "TransparentWindow.zip", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-30T09:36:38.000+0000", "size": 5930798, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: Transparent windows are opaque on Android", "creator": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "environment": "Alloy 1.3.1 / Titanium SDK 3.2.0.GA SDK Android only, probably in Alloy 1.3.0 also (not sure)\r\nTested on HTC One X, Kindle Fire HD\r\nThis works on iOS 7.0 Emulator and this worked on Android with Ti SDK 3.1.2 and the Alloy that shipped with it.", "comment": { "comments": [ { "id": "288816", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "I tested this issue with the test code below. I can't reproduce this issue in latest TiSDK. On Android, to specify a semi-transparent [background| http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-backgroundColor], set the alpha value using the opacity property before opening the window. Let us know if this helps.\r\n\r\n\r\nh5. Test Environment\r\nMac OX S 10.8.5\r\nTi SDK 3.2.0.GA\r\nTi CLI 3.2.0 \r\nAndroid SDK 4.4 \r\n\r\nh5. Test Code\r\n\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nh5. Step to Test \r\n\r\n# Create a simple alloy project \r\n# Update index.xml with my test code \r\n# Run on android device for testing \r\n# It will show transparent background \r\n\r\nThanks \r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-20T13:14:46.000+0000", "updated": "2014-01-21T00:31:23.000+0000" }, { "id": "288950", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "body": "That is not the desired behavior. I don't want the foreground to be partially transparent. I want the background to be totally transparent.\r\n\r\nThis worked properly in previous SDKs and it still works on iOS. I have uploaded screenshots from my app using Alloy 1.3.1beta3. Notice on Android how the background is black and on iOS the background (not the foreground) is fully transparent. Android worked like iOS still does in previous versions of Alloy/TI SDK.\r\n\r\nDid you use Alloy 1.3.1beta3?\r\n\r\nPlease fix it the way it was in the previous versions of the SDK / Alloy.", "updateAuthor": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-21T02:29:01.000+0000", "updated": "2014-01-21T02:49:44.000+0000" }, { "id": "290384", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "body": "Do you have a status update on this?\r\n\r\nThis is really important to me. This makes my app unusable. I use this technique a lot in the app. It's difficult to go back to an old SDK because I upgrades to Xcode 5.0.1 not know I would be forced to upgrade Alloy / Titanium SDK and 1.3.0 added a crashing bug that was fixed in beta 3 (ALOY-922). I need to release an update soon. Do you understand that opacity effects the foreground and 'transparent' in the backgroundColor only makes the background transparent. Without this working it makes a whole class of problem unsolvable.\r\n\r\nThanks in advance for your help.", "updateAuthor": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-30T01:26:00.000+0000", "updated": "2014-01-30T01:28:47.000+0000" }, { "id": "290394", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Henry,\n\nCan you please post a complete test case so that we can easily differentiate the UI behavior pre-1.3 alloy and 1.3+ Once reproduced, we will move this for fix.\n\nRegards,\nShak", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-30T04:36:17.000+0000", "updated": "2014-01-30T04:36:17.000+0000" }, { "id": "290400", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "body": "OK. I thought it was obvious from the pictures I posted. I open a window above another window. The new window has a 'transparent' background and you see the content above the window as if floating above the first window.", "updateAuthor": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-30T06:45:45.000+0000", "updated": "2014-01-30T06:45:45.000+0000" }, { "id": "290410", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "body": "This is a zip file of a project folder called 'TransparentWindow' that demonstrates the bug. It works on iOS but does not work on Android. The window location is a little off on Android as well, I'm not sure why at this point.", "updateAuthor": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-30T09:36:39.000+0000", "updated": "2014-01-30T09:38:14.000+0000" }, { "id": "290413", "author": { "name": "shadym", "key": "shadym", "displayName": "Pavel Kartsel", "active": true, "timeZone": "Europe/Moscow" }, "body": "Henry,\n\nAs a hack, you can get transparent background by setting popup window style:\n{code:js}\nnavBarHidden: true,\nmodal: true,\nbackgroundColor: 'transparent',\nbackgroundImage: 'transparent-pixel.png'\n{code}\nResult:\n!http://s28.postimg.org/3rdc8rk7x/unnamed.png!", "updateAuthor": { "name": "shadym", "key": "shadym", "displayName": "Pavel Kartsel", "active": true, "timeZone": "Europe/Moscow" }, "created": "2014-01-30T11:51:38.000+0000", "updated": "2014-01-30T11:51:38.000+0000" }, { "id": "290497", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "body": "Thanks! That should at least get me through Beta.", "updateAuthor": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-01-30T21:00:02.000+0000", "updated": "2014-01-30T21:00:02.000+0000" }, { "id": "290598", "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 Android platform while it works correctly for iOS platform. Please use attached test TransparentWindow.zip file for a simple test case. Even though it is an Alloy test case, it is most likely a TIMOB issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-31T07:20:59.000+0000", "updated": "2014-01-31T07:20:59.000+0000" }, { "id": "294296", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-02-23T19:49:50.000+0000", "updated": "2014-02-23T20:06:17.000+0000" }, { "id": "294400", "author": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "body": "Why did this work in previous Titanium SDKs on Android. Was it because it used to create a lightweight window instead of a heavy weight window?", "updateAuthor": { "name": "dspells", "key": "dspells", "displayName": "Henry David Spells III", "active": true, "timeZone": "America/Chicago" }, "created": "2014-02-24T18:20:58.000+0000", "updated": "2014-02-24T18:20:58.000+0000" }, { "id": "294407", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yes, I guess it works fine on lightweight windows.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-02-24T18:32:51.000+0000", "updated": "2014-02-24T18:32:51.000+0000" }, { "id": "294807", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "\r\nUse TiTranslucentActivity if the backgroundcolor is transparent or has alpha\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5390", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-26T17:21:23.000+0000", "updated": "2014-02-26T17:21:23.000+0000" }, { "id": "294810", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Simple test case to try 'transparent' and alpha-channel\n\n var win = Ti.UI.createWindow();\n\t\n\twin.backgroundColor = 'white';\n\t\n\tvar b1 = Ti.UI.createButton({\n\t\ttitle : 'Open Window',\n\t\theight : 'auto',\n\t\twidth : 'auto'\n\t});\n\t\n\t// Here is an example of creating the menu handlers in the window creation options.\n\tb1.addEventListener('click', function(e) {\n\t\tvar w = Ti.UI.createWindow({\n\t\t\tbackgroundColor : 'transparent'\n\t\t\t//Comment above line and uncomment the below line to try alpha\n\t\t\t//backgroundColor : '#5FFF'\n\t\t});\n\t\t\n\t\tvar l = Ti.UI.createLabel({\n\t\t\tbackgroundColor : 'white', color : 'black',\n\t\t\twidth : 'auto', height : 'auto',\n\t\t\ttext : 'Press the menu button, then select Close Window. You should see a graphic w/ the menu text.'\n\t\t});\n\t\tw.add(l);\n\t\t\n\t\tw.open({ animated : true});\n\t});\n\t\n\twin.add(b1);\n\twin.open();", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-26T17:25:42.000+0000", "updated": "2014-02-26T17:25:42.000+0000" }, { "id": "302368", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified the fix using the above testcase, setting parent window's background color red and child window's as transparent, red background is visible.\r\n\r\nVerified on:\r\nDevice : Google Nexus 7, Android Version: 4.4.2\r\nDevice: LG-P970, Android version: 4.0.4\r\nSDK: 3.3.0.v20140423155715\r\nCLI version : 3.3.0-dev\r\nOS : MAC OSX 10.9.2\r\nAlloy: 1.4.0-dev\r\nACS: 1.0.14\r\nnpm:1.3.2\r\nAppcelerator Studio, build: 3.3.0.201404211130\r\ntitanium-code-processor: 1.1.1-alpha\r\nXCode : 5.1.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-24T10:25:04.000+0000", "updated": "2014-04-24T10:25:04.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }