[TIMOB-7916] Android: TableViewSection - For-loop counter does not increment properly when added to a TableViewSection
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-13T17:41:45.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 3.0.2 |
Components | Android |
Labels | qe-nfc, triage |
Reporter | Wilson Luu |
Assignee | Shameer Jan |
Created | 2012-03-07T12:50:59.000+0000 |
Updated | 2017-03-21T21:32:10.000+0000 |
Description
Steps to reproduce:
1. Run the following app.js on Android:
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var tableView = Ti.UI.createTableView();
var data = [];
for (var c=0;c<4;c++)
{
var label = Ti.UI.createLabel({
text:'Header ' + (c+1),
color:'black',
width:'auto',
height: 'auto',
left:4
});
var pinkHeader = Ti.UI.createView({backgroundColor: 'pink', height: 40});
pinkHeader.add(label);
data[c] = Ti.UI.createTableViewSection({
headerView: pinkHeader
});
for (var x=0;x<10;x++)
{
data[c].add(Ti.UI.createTableViewRow({title:'Group '+(c+1)+', Row '+(x+1)}));
}
}
tableView.data = data;
win.add(tableView);
win.open();
*Actual:* Notice pink headers are not incrementing properly. Displaying Header 1, Header 2, Header 1, Header 2
*Expected:* Should display Header 1, Header 2, Header3, Header 4
2. Scroll to the bottom of the table then back up a couple of times
*Actual:* Headers displays Header 2, Header 1, Header 2, Header 1
*Expected:* Headers should stay Header 1, Header 2, Header 3, Header 4
*Note:*
* The above code works fine on iOS using SDK build 2.0.0.v20120307114708
* Was not able to test for regression in 1.8.2 because of bug TIMOB-3435
This is still an issue and it would be great if it could get some attention. Here is another reproduction case using a view instead of a label for the headerView.
The issue cannot reproduce with the release 3.0.2 and 3.1.0
Closing ticket as the issue cannot be reproduced.