{ "id": "126419", "key": "TIMOB-16464", "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": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2017-06-27T20:40:10.000+0000", "created": "2014-02-14T10:59:08.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-3.2.1" ], "versions": [ { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-27T20:40:10.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": "appendSection method not working properly on Android.\r\nIt overwrites the previous listView data.\r\nNot a regression as it occurs on 3.2.0.GA also.\r\n\r\nSteps to reproduce:\r\n1. Copy paste the code in app.js and run the app.\r\n\r\nExpected Result:\r\n1.Should get Header as \"Fruits and Fish\" and Apple and Banana under Fruits header.\r\nGetting this in iOS.\r\n\r\nActual Result:\r\n1.Getting only Fish Header.\r\n\r\n\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n title: \"Search\",\r\n navBarHidden: false,\r\n layout: 'vertical'\r\n});\r\n \r\n//Create search bar\r\nvar listSearch = Titanium.UI.createSearchBar({\r\n barColor:'#C7C7C7',\r\n height: 43,\r\n top: 0\r\n});\r\n \r\n//Function to catch click event from Template\r\nfunction clickEvent (e) {\r\n alert(JSON.stringify(e)); \r\n}//\r\n \r\n//Template with 2 labels\r\nvar plainTemplate = {\r\n childTemplates: [\r\n { // Title\r\n type: 'Ti.UI.Label', // Use a label for the title\r\n bindId: 'title', // Maps to a custom title property of the item data\r\n properties: { // Sets the label properties\r\n color: '#000',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n left: '60dp', top: 0,\r\n },\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'subtitle', // Maps to a custom subtitle property of the item data\r\n properties: { // Sets the label properties\r\n color: '#000',\r\n font: { fontFamily:'Arial', fontSize: '14dp' },\r\n left: '60dp', top: '25dp',\r\n }\r\n }\r\n ],\r\n // Binds a callback to the click event, which catches events bubbled by the view subcomponents.\r\n events: {click: clickEvent },\r\n properties :{\r\n accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE\r\n }\r\n};\r\n \r\n \r\n//Create ListView\r\nvar listView = Ti.UI.createListView({\r\n templates: { 'template': plainTemplate }, //with template theres no search bar\r\n defaultItemTemplate: 'template', //comment out template and search bar works \r\n searchView: listSearch,\r\n caseInsensitiveSearch: true,\r\n searchHidden: false\r\n}); \r\n \r\n \r\nvar sections = []; //array\r\n \r\n//Fruit section\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});\r\nvar fruitDataSet = [\r\n { title: {text: 'Apple' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Apple', properties: {title: 'Apple', subtitle: 'Sub sub label', searchableText: 'Apple', itemId: 1, accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE}},\r\n { title: {text: 'Banana' }, subtitle: { text: 'Sub sub label' }, searchableText: 'Banana', properties: { itemId: 2, title: 'Banana', subtitle: 'Sub sub label', searchableText: 'Banana', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }},\r\n {properties: { title: 'Pear', subtitle: 'Sub sub label', searchableText: 'Pear'}},\r\n {properties: { title: 'Orange', subtitle: 'Sub sub label', searchableText: 'Orange'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n \r\n\r\nlistView.sections = sections; //assign sections\r\n\r\n \r\nwin.add(listView); //add to win\r\n \r\n//Example of appending Fish section\r\nvar fishSection = Ti.UI.createListSection({ headerTitle: 'Fish'});\r\nvar fishDataSet = [\r\n {properties: { title: 'Cod', subtitle: 'Sub sub label', searchableText: 'Cod'}},\r\n {properties: { title: 'Haddock', subtitle: 'Sub sub label', searchableText: 'Haddock'}},\r\n];\r\nfishSection.setItems(fishDataSet);\r\nlistView.appendSection(fishSection);\r\n \r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android:ListView:appendSection method not working properly", "creator": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Appc Studio:3.2.1.201402061120\r\nSdk:3.2.1.GA\r\nalloy:1.3.1\r\ntitanium:3.2.1\r\ntitanium-code-processor:1.1.0\r\nDevice:Iphone5c(7.0.4),LG-P970(V4.0.4)", "comment": { "comments": [ { "id": "422991", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am unable to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170623141152\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-27T20:40:10.000+0000", "updated": "2017-06-27T20:40:10.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }