{ "id": "113316", "key": "TIMOB-13661", "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": "15418", "description": "2013 Sprint 09 API", "name": "2013 Sprint 09 API", "archived": true, "released": true, "releaseDate": "2013-05-06" }, { "id": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-04-29T22:12:28.000+0000", "created": "2013-04-23T23:05:55.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "supportTeam" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "28260", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "103007", "key": "TIMOB-11335", "fields": { "summary": "iOS: Table view row selected background doesn't fade out when backgroundGradient is set", "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 } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T17:52:32.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": "h6.Problem\r\nIn the previous SDK (3.0.0 GA) the behavior of changing the backgroundGradient for a tableViewRow was instantaneous. Now there seems to be a premade fading transition from one backgroundGradient to the other. \r\n\r\nh6.Snippet sample\r\n- app.js\r\n{code}\r\nvar view = require('FirstView')();\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\nwin.add(view);\r\nwin.open();\r\n{code}\r\n\r\n- FirstView.js\r\n{code}\r\n//FirstView Component Constructor\r\nfunction FirstView() {\r\n\t//create object instance, a parasitic subclass of Observable\r\n\tvar self = Ti.UI.createWindow({\r\n\t\tbackgroundColor : 'black',\r\n\t\tnavBarHidden : true,\r\n\t\texitOnClose : true\r\n\t});\r\n\r\n\t//construct UI\r\n\r\n\tvar selector = Ti.UI.createTableView({\r\n\t\theight : 500,\r\n\t\tborderColor : 'blue',\r\n\t\tborderRadius : 1,\r\n\t\ttop : '15%',\r\n\t\twidth : '80%',\r\n\t\tbackgroundColor : 'none',\r\n\t\tstyle : Ti.UI.iPhone.TableViewStyle.GROUPED\r\n\t});\r\n\r\n\tvar id = 1;\r\n\tvar defaultGradient = {\r\n\t\ttype : \"linear\",\r\n\t\tcolors : [\"#f7f8fa\", \"#e9ebec\"],\r\n\t\tstartPoint : {\r\n\t\t\tx : 0,\r\n\t\t\ty : 0\r\n\t\t},\r\n\t\tendPoint : {\r\n\t\t\tx : 0,\r\n\t\t\ty : '100%'\r\n\t\t},\r\n\t\tbackFillStart : true\r\n\t};\r\n\tvar selectedGradient = {\r\n\t\ttype : \"linear\",\r\n\t\tcolors : [\"#97c5e8\", \"#5496d6\"],\r\n\t\tstartPoint : {\r\n\t\t\tx : 0,\r\n\t\t\ty : 0\r\n\t\t},\r\n\t\tendPoint : {\r\n\t\t\tx : 0,\r\n\t\t\ty : '100%'\r\n\t\t},\r\n\t\tbackFillStart : true\r\n\t};\r\n\tvar createDataRow = function(e) {\r\n\t\tvar newRow = Ti.UI.createTableViewRow({\r\n\t\t\ttitle : e.name,\r\n\t\t\trowID : id,\r\n\t\t\thasChild : true,\r\n\t\t\tbackgroundGradient : defaultGradient,\r\n\t\t\thighlightState : 'none'\r\n\t\t});\r\n\t\tnewRow.addEventListener('touchend', function(e) {\r\n\t\t\tif (e.source.highlightState == 'none') {\r\n\t\t\t\te.source.backgroundGradient = selectedGradient;\r\n\t\t\t\te.source.highlightState = 'active';\r\n\t\t\t} else {\r\n\t\t\t\te.source.backgroundGradient = defaultGradient;\r\n\t\t\t\te.source.highlightState = 'none';\r\n\t\t\t}\r\n\t\t});\r\n\t\tid += Math.ceil(Math.random() * 5);\r\n\t\treturn newRow;\r\n\t};\r\n\tvar randomLetter = function() {\r\n\t\tvar rubric = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\tvar idx = Math.floor(Math.random() * 26);\r\n\t\treturn rubric.charAt(idx);\r\n\t};\r\n\tvar dataArray = [];\r\n\tfor (var i = 0; i < 10; i++) {\r\n\t\tvar length = Math.ceil(Math.random() * 15);\r\n\t\tvar buffer = \"ID: \";\r\n\t\tfor (var j = 0; j < length; j++) {\r\n\t\t\tbuffer += randomLetter();\r\n\t\t}\r\n\t\tdataArray.push(createDataRow({\r\n\t\t\tname : buffer\r\n\t\t}));\r\n\t}\r\n\tselector.setData(dataArray);\r\n\tself.add(selector);\r\n\treturn self;\r\n}\r\n\r\nmodule.exports = FirstView;\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Fading between backgroundGradients in tableViewRows", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "iOS 5 & 6\r\nTitanium SDK 3.1.0.GA", "comment": { "comments": [ { "id": "249458", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The change is due to the fix for TIMOB-11335. To replicate behavior similar to older SDK's use the following code\n{code}\n//FirstView Component Constructor\n var defaultGradient = {\n type : \"linear\",\n colors : [\"#f7f8fa\", \"#e9ebec\"],\n startPoint : {\n x : 0,\n y : 0\n },\n endPoint : {\n x : 0,\n y : '100%'\n },\n backFillStart : true\n };\n var selectedGradient = {\n type : \"linear\",\n colors : [\"#97c5e8\", \"#5496d6\"],\n startPoint : {\n x : 0,\n y : 0\n },\n endPoint : {\n x : 0,\n y : '100%'\n },\n backFillStart : true\n };\n\nfunction FirstView() {\n //create object instance, a parasitic subclass of Observable\n var self = Ti.UI.createWindow({\n backgroundColor : 'black',\n navBarHidden : true,\n exitOnClose : true\n });\n \n //construct UI\n \n var selector = Ti.UI.createTableView({\n height : 500,\n borderColor : 'blue',\n borderRadius : 1,\n top : '15%',\n width : '80%',\n backgroundColor : 'none',\n style : Ti.UI.iPhone.TableViewStyle.GROUPED,\n allowsSelection: true\n });\n \n var id = 1;\n var createDataRow = function(e) {\n var newRow = Ti.UI.createTableViewRow({\n title : e.name,\n rowID : id,\n hasChild : true,\n backgroundGradient : defaultGradient,\n highlightState : 'none'\n });\n \n id += Math.ceil(Math.random() * 5);\n return newRow;\n };\n var randomLetter = function() {\n var rubric = \"abcdefghijklmnopqrstuvwxyz\";\n var idx = Math.floor(Math.random() * 26);\n return rubric.charAt(idx);\n };\n var dataArray = [];\n for (var i = 0; i < 10; i++) {\n var length = Math.ceil(Math.random() * 15);\n var buffer = \"ID: \";\n for (var j = 0; j < length; j++) {\n buffer += randomLetter();\n }\n dataArray.push(createDataRow({\n name : buffer\n }));\n }\n selector.setData(dataArray);\n self.add(selector);\n\n selector.addEventListener('click', function(e){\n if (e.row.highlightState == 'none') {\n e.row.backgroundGradient = selectedGradient;\n e.row.highlightState = 'active';\n } else {\n e.row.backgroundGradient = defaultGradient;\n e.row.highlightState = 'none';\n }\n selector.deselectRow(e.index,{'animated':false});\n })\n return self;\n}\n\n\nvar win = FirstView();\nwin.open();\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-29T22:10:57.000+0000", "updated": "2013-04-29T22:10:57.000+0000" }, { "id": "249461", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "JS workaround provided", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-29T22:12:28.000+0000", "updated": "2013-04-29T22:12:28.000+0000" }, { "id": "416214", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\", with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T17:52:32.000+0000", "updated": "2017-03-29T17:52:32.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }