{ "id": "93943", "key": "TIMOB-9865", "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": "2012-06-26T16:42:36.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:34.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The following app.js demos the issue\r\n\r\n{code:title=app.js|borderStyle=solid}\r\n(function() {\t\r\n\tvar self = Titanium.UI.createWindow({\r\n title: 'Window',\r\n backgroundColor: 'white',\r\n }); \r\n self.add(Ti.UI.createLabel({text: 'A label just to provide some background text to be overlayed with the views below'}));\r\n \r\n var view = Ti.UI.createView({\r\n top:0,left:0,\r\n width:'100%',\r\n height:'100%',\r\n opacity: 0.60,\r\n backgroundColor: '#000000'\r\n });\r\n \r\n // Make a view to border all the items\r\n var inner_view = Ti.UI.createView({\r\n width: '120',\r\n height:'70',\r\n backgroundColor: '#222222',\r\n borderWidth: 1,\r\n borderColor: '#000',\r\n layout: 'vertical',\r\n opacity: 1.0,\r\n });\r\n \r\n for(var i=0; i<3; i++){\r\n var b = Ti.UI.createLabel({\r\n text: 'Item 1',\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, \r\n top: 5,\r\n borderWidth: 1,\r\n backgroundColor: '#353535',\r\n color: '#fff',\r\n opacity: 1.0,\r\n });\r\n inner_view.add(b);\r\n }\r\n \r\n view.add(inner_view);\r\n self.add(view);\r\n\r\n self.open();\r\n})();\r\n{code}\r\n\r\nNote: on Android this works as expected.", "attachment": [ { "id": "28740", "filename": "screenshot-1.jpg", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2012-06-26T16:43:05.000+0000", "size": 18794, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS: Opacity in nested views is inherited regardless of child opacity value", "creator": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "environment": "iOS 5\r\nSDK 2.0.2\r\nDev machine: 10.6.6 OSX\r\n", "comment": { "comments": [ { "id": "208271", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Having the same issue with my application. Would like to create an overlay that shows some of the background, but with views on top of it that are completely opaque", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2012-07-18T06:07:03.000+0000", "updated": "2012-07-18T06:07:03.000+0000" }, { "id": "244443", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-28T08:41:19.000+0000", "updated": "2013-03-28T08:41:19.000+0000" }, { "id": "270844", "author": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "body": "It maybe that this is an iOS issue rather than appcelerator. The work around that I have found is to have two views under the main window to add things to.\r\n\r\n{code}\r\nWindow -> opaque_view\r\nWindow -> non_opaque_view\r\n{code}\r\n\r\nThen add the \"overlay\" items to the non_opaque view and so long as it is in the right order (or z-index'd) it seems to work)", "updateAuthor": { "name": "ndastur", "key": "ndastur", "displayName": "Neville Dastur", "active": true, "timeZone": "Europe/London" }, "created": "2013-09-12T13:39:50.000+0000", "updated": "2013-09-12T13:39:50.000+0000" }, { "id": "324907", "author": { "name": "ryan@asleson.net", "key": "ryan@asleson.net", "displayName": "Ryan Asleson", "active": true, "timeZone": "America/Chicago" }, "body": "This is definitely still an issue. I was working on an app and came across this behavior. I spent almost an hour on it before I figured that it *had* to be a bug and wasn't just an error on my part. Did some web searching and came across this issue.\r\n\r\n", "updateAuthor": { "name": "ryan@asleson.net", "key": "ryan@asleson.net", "displayName": "Ryan Asleson", "active": true, "timeZone": "America/Chicago" }, "created": "2014-09-22T15:01:54.000+0000", "updated": "2014-09-22T15:01:54.000+0000" }, { "id": "325143", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Can use a background color with an rbga value.\r\n\r\nios the alpha value is between 0-1\r\nrgba(255,255,255,.5)\r\n\r\nandroid the alpha value is between 0-255\r\nrgba(255,255,255,128)", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-09-23T14:32:36.000+0000", "updated": "2014-09-23T14:32:36.000+0000" }, { "id": "385285", "author": { "name": "dirleidionisio", "key": "dirleidionisio", "displayName": "Dirlei DionĂ­sio", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "About RGBA: http://www.appcelerator.com/blog/2014/11/adding-transparent-background/", "updateAuthor": { "name": "dirleidionisio", "key": "dirleidionisio", "displayName": "Dirlei DionĂ­sio", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-05-10T14:51:16.000+0000", "updated": "2016-05-10T14:51:16.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }