{ "id": "151050", "key": "TIMOB-19482", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-29T12:52:31.000+0000", "created": "2015-09-09T16:37:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [ { "id": "48926", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "150632", "key": "TIMOB-19394", "fields": { "summary": "Parity: Ti.UI.View.add should support array of views on Windows as iOS", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "48961", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "151105", "key": "TIDOC-2304", "fields": { "summary": "Docs: Ti.UI.View.add supports an array of views as well as single Ti.Ui.View", "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": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-11-22T18:12:30.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": "On iOS {{Ti.UI.View.add()}} accepts an array of views:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/0357b4796abf0032485018fac42614a94f826c9b/iphone/Classes/TiViewProxy.m#L148\r\n\r\nOn Android it does not:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L159\r\n\r\nThis is a very useful feature and looking at the iOS code simple to implement for Android and Windows as well.\r\n\r\nRelated question on Q&A:\r\nhttps://community.appcelerator.com/topic/3075/unable-to-add-array-of-views-to-parent-view-on-android", "attachment": [], "flagged": false, "summary": "Parity: Ti.UI.View.add should support array of views on Android as iOS", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 4.1.0.GA", "comment": { "comments": [ { "id": "370500", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Can we schedule this one for the next release so that - with TIMOB-19394 and TIDOC-2282 already resolved - we can demonstrate how to use this cross-platform in a sample app for the next release.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-17T09:01:36.000+0000", "updated": "2015-11-17T09:01:36.000+0000" }, { "id": "388718", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8077\r\n\r\nDemo:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\nvar btn1 = Ti.UI.createButton({\r\n title: \"Add views together\",\r\n top: 0\r\n});\r\n\r\nvar view1 = Ti.UI.createView({\r\n backgroundColor: \"red\",\r\n top: 50,\r\n height: 100\r\n});\r\nvar view2 = Ti.UI.createView({\r\n backgroundColor: \"green\",\r\n bottom: 50,\r\n height: 100\r\n});\r\n\r\nbtn1.addEventListener(\"click\", function() {\r\n win.remove(view1);\r\n win.remove(view2);\r\n\r\n // Just to see that they are actually removed before\r\n setTimeout(function() {\r\n win.add([view1, view2]);\r\n }, 250);\r\n});\r\n\r\nvar btn2 = Ti.UI.createButton({\r\n title: \"Add views after each other\",\r\n bottom: 0\r\n});\r\n\r\nbtn2.addEventListener(\"click\", function() {\r\n win.remove(view1);\r\n win.remove(view2);\r\n\r\n // Just to see that they are actually removed before\r\n setTimeout(function() {\r\n win.add(view1);\r\n win.add(view2);\r\n }, 250);\r\n});\r\n\r\nwin.add(btn1);\r\nwin.add(btn2);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-06-21T03:47:02.000+0000", "updated": "2016-08-07T10:22:43.000+0000" }, { "id": "392583", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR + demo-code updated, ready for review.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-07T10:23:02.000+0000", "updated": "2016-08-07T10:23:02.000+0000" }, { "id": "397628", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reviewed and made some changes\r\n\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/8452", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-29T12:49:23.000+0000", "updated": "2016-09-29T12:49:23.000+0000" }, { "id": "401700", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed by using the code above provided by [~hansknoechel] was able to press the \"Add Views Together button\" without crashing. Also verified by the code provided by [~gmathews] in https://github.com/appcelerator/titanium_mobile/pull/8452 was able to press \"Add View Array\" without the app crashing. (Tested on SDK version 6.1.0.v20161121162514).\r\n*Environment*\r\n{code:java}\r\nAppcelerator Command-Line Interface, version 6.0.0\r\nAndroid 7.0 (Google Nexus 6P)\r\nOperating System Name: Mac OS X El Capitan\r\nOperating System Version: 10.11.6\r\nNode.js Version: 4.6.0\r\nnpm: 4.2.8\r\nTitanium CLI Version: 5.0.10\r\nTitanium SDK Version: 6.1.0.v20161121162514\r\nXcode: 8.0\r\nAppcelerator Studio: 4.8.0.201611121409\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-22T18:11:43.000+0000", "updated": "2016-11-22T18:11:43.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }