{ "id": "103999", "key": "TIMOB-11586", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14621", "description": "2012 Sprint 23 API", "name": "2012 Sprint 23 API", "archived": true, "released": true, "releaseDate": "2012-11-19" }, { "id": "14623", "description": "2012 Sprint 23 JS", "name": "2012 Sprint 23", "archived": true, "released": true, "releaseDate": "2012-11-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-11-16T19:02:35.000+0000", "created": "2012-10-26T21:38:47.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "Parity", "api", "module_view", "qe-testadded" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [ { "id": "36375", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "128549", "key": "TIMOB-16793", "fields": { "summary": "iOS: Window: backgroundGradient on window hides the text", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "36996", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "127714", "key": "TIMOB-16875", "fields": { "summary": "iOS: Change in \"insertSubview\" (via TIMOB-11586) causes crash", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-23T14:20:52.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Using backgroundGradient property to a view changes the order in which the views are added to it. It works fine on android. Please find attached screenshot with and without the backgroundGradient property.\r\nh4. Repo Steps \r\n1. Run the below code in your project's app.js\r\n2. You can see that the green view is behind the red view. The order of the views changes after adding the backgroundGradient property.\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\nvar g_backgroundGradient = {startPoint: {x:0, y:0}, endPoint: {x:400, y:600}, colors:['blue', 'orange'], type: 'linear'};\r\n\r\nvar backview = Titanium.UI.createView({\r\n\tbackgroundGradient : g_backgroundGradient // <<< COMMENT OUT THIS LINE TO FIX PROBLEM\r\n});\r\n\r\nvar view1 = Titanium.UI.createView({\r\n\tbackgroundColor : 'red',\r\n\twidth : '300',\r\n\theight : '400',\r\n\tleft : 15,\r\n\ttop : 15,\r\n\tzindex : 10,\r\n});\r\n\r\nvar view2 = Titanium.UI.createView({\r\n\twidth : '100',\r\n\theight : '70',\r\n\tleft : 5,\r\n\ttop : 5,\r\n\tbackgroundColor : 'green',\r\n\tzindex : 1\r\n});\r\nbackview.add(view1);\r\nbackview.add(view2);\r\n\r\nwin1.add(backview);\r\n\r\nwin1.open(); \r\n{code}", "attachment": [ { "id": "33010", "filename": "with_backgroundGradient.png", "author": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T21:38:47.000+0000", "size": 90559, "mimeType": "image/png" }, { "id": "33009", "filename": "without_backgroundGradient.png", "author": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-26T21:38:47.000+0000", "size": 77466, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Using the backgroundGradient property changes the order in which views are added", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 6\r\niPhone4 or iOS6 simulator\r\nTi SDK 2.1.3.GA", "comment": { "comments": [ { "id": "225562", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/3357", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-10-30T19:34:08.000+0000", "updated": "2012-10-30T19:34:08.000+0000" }, { "id": "235032", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Views displayed in correct order.\r\nVerified on:\r\nStudio: 3.0.1.201212181159\r\nSDK: 3.1.0.v20130114171802\r\niOS Device: iPhone Simulator (v6.0), iPhone4S (v5.1), iPhone5 (v6.0)\r\nXCode: 4.5.2", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-20T23:09:45.000+0000", "updated": "2013-01-20T23:09:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }