{ "id": "103047", "key": "TIMOB-11352", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14165", "description": "2012 Sprint 21 API", "name": "2012 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2012-10-22" }, { "id": "14273", "description": "2012 Sprint 21", "name": "2012 Sprint 21", "archived": true, "released": true, "releaseDate": "2012-10-22" }, { "id": "14784", "description": "2012 Sprint 25 API", "name": "2012 Sprint 25 API", "archived": true, "released": true, "releaseDate": "2012-12-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-12-12T23:12:54.000+0000", "created": "2012-10-10T10:54:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_tableview", "qe-testadded", "triage" ], "versions": [], "issuelinks": [ { "id": "24159", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "107357", "key": "TIMOB-12202", "fields": { "summary": "Android: Section header views are redrawn when a TabGroup is used ", "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": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-09-26T07:35:46.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": "h1. Problem description\r\nWhen a TableViewSection has many rows (~30 or more), the title of the first section is repeated for the other ones. When the rows are few, this doesn't happen.\r\n\r\nh1. Steps to reproduce\r\n- Use the following sample to reproduce the issue:\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n title : 'Window',\r\n left : 0,\r\n top : 0,\r\n backgroundColor : '#FFF'\r\n});\r\n\r\nwin1.open();\r\n\r\n\r\n// section 1\r\nvar headerView1 = Ti.UI.createView({\r\n height:35,\r\n backgroundColor:'#64A5DB',\r\n opacity:0.8\r\n});\r\nheaderView1.add(Ti.UI.createLabel({\r\n left:10,\r\n height:35,\r\n width:Ti.UI.SIZE,\r\n text: \"Classes\",\r\n ellipsize:true,\r\n color:'white',\r\n font:{\r\n fontSize:15,\r\n fontWeight:'bold'\r\n }\r\n}));\r\n\r\nvar section1 = Ti.UI.createTableViewSection({\r\n headerView: headerView1 \r\n});\r\n\r\nfor(var i=0; i<30; i++) {\r\n section1.add(Ti.UI.createTableViewRow({title: \"Section 1 - Row \" + (i+1)}));\r\n}\r\n\r\n// 2nd section\r\nvar headerView2 = Ti.UI.createView({\r\n height:35,\r\n backgroundColor:'#64A5DB',\r\n opacity:0.8\r\n});\r\nheaderView2.add(Ti.UI.createLabel({\r\n left:10,\r\n height:35,\r\n width:Ti.UI.SIZE,\r\n text: \"Topics\",\r\n ellipsize:true,\r\n color:'white',\r\n font:{\r\n fontSize:15,\r\n fontWeight:'bold'\r\n }\r\n}));\r\n\r\nvar section2 = Ti.UI.createTableViewSection({\r\n headerView: headerView2 \r\n});\r\n\r\nfor(var i=0; i<30; i++) {\r\n section2.add(Ti.UI.createTableViewRow({title: \"Section 2 - Row \" + (i+1)}));\r\n}\r\n\r\nvar tableview = Ti.UI.createTableView({\r\n data: [section1, section2]\r\n});\r\n\r\nwin1.add(tableview);\r\n{code}\r\n\r\n- Run the app: note how the section 2 header says 'Classes' and not 'Topics'.\r\n- Change the number of rows from 30 to 3 and repeat: now everything is fine.\r\n\r\nh1. Note\r\nWorks fine on iOS", "attachment": [], "flagged": false, "summary": "Android: TableViewSection header title does not change if sections have many rows", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 2.1.3\r\nSDK 3.0.0.v20121002161335\r\nAndroid 2.3.3\r\nAndroid 4", "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "222968", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've tried to reproduce this and haven't been able to.\n\nAre you sure that you are using a recent 3.0.X SDK?\nYou need to make sure that the SDK you are using\nincludes the change for TIMOB-10458.\n", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-10T21:02:22.000+0000", "updated": "2012-10-10T21:02:22.000+0000" }, { "id": "222980", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Maybe related to TIMOB-10712. Cannot reproduce this issue with latest 3_0_X and master.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-10T21:32:44.000+0000", "updated": "2012-10-10T21:32:44.000+0000" }, { "id": "224638", "author": { "name": "meeech", "key": "meeech", "displayName": "Mitchell Amihod", "active": true, "timeZone": "America/New_York" }, "body": "i see this in 2.1.3 as well", "updateAuthor": { "name": "meeech", "key": "meeech", "displayName": "Mitchell Amihod", "active": true, "timeZone": "America/New_York" }, "created": "2012-10-22T14:41:39.000+0000", "updated": "2012-10-22T14:41:39.000+0000" }, { "id": "230384", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This has been tested in 3.1 and seems to be fixed, but when rotated into landscape, it appears again. Will provide more information shortly.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T15:11:26.000+0000", "updated": "2012-12-07T15:11:26.000+0000" }, { "id": "230589", "author": { "name": "zorfling", "key": "zorfling", "displayName": "Chris Colborne", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Not sure if I should add this here, or create a new issue? Anyway, here it is.\r\n\r\nThere seems to be a related bug where the headerView element gets shuffled when scrolling.\r\n\r\nTry the example code below. It should have headers Red, Green, Purple, Purple.\r\nIn 2.1.4, the titles get skewed (eg Red, Green, Purple, Red) with the same background colours.\r\nIn 3.0.0.v20121207120202, the titles are correct, however the background colours still skew. So text Red, Green, Purple, Purple, but colours red, green, purple, red.\r\n\r\n{code}\r\nvar RED = 'Red',\r\n GREEN = 'Green',\r\n PURPLE = 'Purple';\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'#fff',\r\n layout: 'vertical'\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n \r\n});\r\n\r\nvar tableSection1 = createSectionForGroup(RED);\r\nvar tableSection2 = createSectionForGroup(GREEN);\r\nvar tableSection3 = createSectionForGroup(PURPLE);\r\nvar tableSection4 = createSectionForGroup(PURPLE);\r\n\r\nvar tableRow = Ti.UI.createTableViewRow({\r\n title:'Row'\r\n});\r\n\r\nvar rows = 7;\r\n\r\nfor(i=0; i<=rows; i++) {\r\n tableSection1.add(tableRow);\r\n}\r\n\r\nfor(i=0; i<=rows; i++) {\r\n tableSection2.add(tableRow);\r\n}\r\n\r\nfor(i=0; i<=rows; i++) {\r\n tableSection3.add(tableRow);\r\n}\r\n\r\nfor(i=0; i<=rows; i++) {\r\n tableSection4.add(tableRow);\r\n}\r\n\r\ntable.setData([tableSection1, tableSection2, tableSection3, tableSection4]);\r\nwin1.add(table);\r\n\r\n// open tab group\r\nwin1.open();\r\n\r\n\r\nfunction createSectionForGroup(group) {\r\n var headerContainerOpts, headerBottomBorderOpts, headerViewOpts;\r\n\r\n headerViewOpts = {\r\n color: 'white',\r\n height: Ti.UI.SIZE,\r\n font: { fontSize: '17sp', fontWeight: 'bold' },\r\n left: 11,\r\n text: group\r\n };\r\n \r\n if (group === RED) {\r\n headerContainerOpts = {\r\n backgroundGradient: {\r\n endPoint: { x: 0, y: '100%' },\r\n startPoint: { x: 0, y: 0 },\r\n type: 'linear',\r\n colors: ['#C53019', '#B32D14']\r\n },\r\n height: 32\r\n };\r\n }\r\n if (group === GREEN) {\r\n headerContainerOpts = {\r\n backgroundGradient: {\r\n endPoint: { x: 0, y: '100%' },\r\n startPoint: { x: 0, y: 0 },\r\n type: 'linear',\r\n colors: ['#2B781E', '#195010']\r\n },\r\n height: 32\r\n };\r\n }\r\n if (group === PURPLE) {\r\n headerContainerOpts = {\r\n backgroundGradient: {\r\n endPoint: { x: 0, y: '100%' },\r\n startPoint: { x: 0, y: 0 },\r\n type: 'linear',\r\n colors: ['#873DA6', '#612A7D']\r\n },\r\n height: 32\r\n };\r\n }\r\n\r\n var container = Ti.UI.createView(headerContainerOpts);\r\n container.add(Ti.UI.createLabel(headerViewOpts));\r\n return Ti.UI.createTableViewSection({\r\n headerView: container,\r\n title: group\r\n });\r\n}\r\n{code}", "updateAuthor": { "name": "zorfling", "key": "zorfling", "displayName": "Chris Colborne", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2012-12-10T05:18:30.000+0000", "updated": "2012-12-10T05:47:05.000+0000" }, { "id": "230693", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "OK, TableView drives the view to proxy association through getView(), which turns the \nassociations into a rats nest. I'll be submitting a PR shortly.", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-10T21:39:33.000+0000", "updated": "2012-12-10T21:39:33.000+0000" }, { "id": "230700", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request https://github.com/appcelerator/titanium_mobile/pull/3561", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-10T21:56:26.000+0000", "updated": "2012-12-10T21:56:26.000+0000" }, { "id": "230739", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's an expansion of the test case shown above with more\nsections for testing:\n\n{code}\n\nvar RED = 'Red',\n GREEN = 'Green',\n PURPLE = 'Purple';\n \nvar win1 = Titanium.UI.createWindow({ \n backgroundColor:'#fff',\n layout: 'vertical'\n});\n \nvar table = Ti.UI.createTableView({\n \n});\n \nvar tableSection1 = createSectionForGroup(RED);\nvar tableSection2 = createSectionForGroup(GREEN);\nvar tableSection3 = createSectionForGroup(PURPLE);\nvar tableSection4 = createSectionForGroup(PURPLE);\nvar tableSection5 = createSectionForGroup(RED);\nvar tableSection6 = createSectionForGroup(GREEN);\nvar tableSection7 = createSectionForGroup(PURPLE);\nvar tableSection8 = createSectionForGroup(PURPLE);\nvar tableSection9 = createSectionForGroup(RED);\nvar tableSection10 = createSectionForGroup(GREEN);\nvar tableSection11 = createSectionForGroup(PURPLE);\nvar tableSection12 = createSectionForGroup(PURPLE);\n \nvar tableRow = Ti.UI.createTableViewRow({\n title:'Row'\n});\n \nvar rows = 7;\n \nfor(i=0; i<=rows; i++) {\n tableSection1.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection2.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection3.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection4.add(tableRow);\n}\n\nfor(i=0; i<=rows; i++) {\n tableSection5.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection6.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection7.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection8.add(tableRow);\n}\n\nfor(i=0; i<=rows; i++) {\n tableSection9.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection10.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection11.add(tableRow);\n}\n \nfor(i=0; i<=rows; i++) {\n tableSection12.add(tableRow);\n}\n \ntable.setData([tableSection1, tableSection2, tableSection3, tableSection4, tableSection5, tableSection6, tableSection7, tableSection8,\n\ttableSection9, tableSection10, tableSection11, tableSection12]);\nwin1.add(table);\n \n// open tab group\nwin1.open();\n \n \nfunction createSectionForGroup(group) {\n var headerContainerOpts, headerBottomBorderOpts, headerViewOpts;\n \n headerViewOpts = {\n color: 'white',\n height: Ti.UI.SIZE,\n font: { fontSize: '17sp', fontWeight: 'bold' },\n left: 11,\n text: group\n };\n \n if (group === RED) {\n headerContainerOpts = {\n backgroundGradient: {\n endPoint: { x: 0, y: '100%' },\n startPoint: { x: 0, y: 0 },\n type: 'linear',\n colors: ['#C53019', '#B32D14']\n },\n height: 32\n };\n }\n if (group === GREEN) {\n headerContainerOpts = {\n backgroundGradient: {\n endPoint: { x: 0, y: '100%' },\n startPoint: { x: 0, y: 0 },\n type: 'linear',\n colors: ['#2B781E', '#195010']\n },\n height: 32\n };\n }\n if (group === PURPLE) {\n headerContainerOpts = {\n backgroundGradient: {\n endPoint: { x: 0, y: '100%' },\n startPoint: { x: 0, y: 0 },\n type: 'linear',\n colors: ['#873DA6', '#612A7D']\n },\n height: 32\n };\n }\n \n var container = Ti.UI.createView(headerContainerOpts);\n container.add(Ti.UI.createLabel(headerViewOpts));\n return Ti.UI.createTableViewSection({\n headerView: container,\n title: group\n });\n}\n{code}", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-10T23:38:44.000+0000", "updated": "2012-12-10T23:38:44.000+0000" }, { "id": "230765", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request https://github.com/appcelerator/titanium_mobile/pull/3566 for backport to 3_0_X", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-11T00:53:37.000+0000", "updated": "2012-12-11T00:53:37.000+0000" }, { "id": "230813", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with Android 2.3.6 and Android 4.1.\r\nTitanium SDK:3.0.0.v20121210171701\r\nTitanium  Studio:3.0.0.201212071410", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-11T08:53:20.000+0000", "updated": "2012-12-11T08:53:20.000+0000" }, { "id": "231149", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening to add fixVersion", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-12T23:12:32.000+0000", "updated": "2012-12-12T23:12:32.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }