Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11390] Android: TableViewRow - Missing tableViewRow data

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-10-11T23:22:56.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsapi, module_tableviewrow, qe-and100112, qe-testadded, regression
ReporterTamila Smolich
AssigneeKarl Rowley
Created2012-10-11T18:39:04.000+0000
Updated2012-11-06T17:42:43.000+0000

Description

Description: TableViewRows data is missing and appears only after device is rotated to different mode. During rotation the window should be open. This is a regression, does not occur on 2.1.3. Steps: 1. Run the following code:
Titanium.UI.setBackgroundColor('#333');

var page2 = Titanium.UI.createWindow({  
    title:'page2',
    backgroundColor:'#fff'
});

var data = [];

var listTable = Titanium.UI.createTableView({});

for(var indice=0; indice<15; indice++) {

    var row = Titanium.UI.createTableViewRow();

    var img = Titanium.UI.createImageView({
            image:'KS_nav_ui.png',
            width:50,
            height:50,
            left:0,
            top:0
    });

    var label = Titanium.UI.createLabel({
        text:indice,
        font:{fontSize:14},
        textAlign:'center',
        borderColor:'black'
    });

    row.add(img);
    row.add(label);
    
    row.hasChild=false;
    row.height = 50;
    row.className = 'list';
                
    data.push(row);
}

listTable.bottom = 50;

listTable.setData(data);
        
page2.add(listTable);

var b2 = Titanium.UI.createButton({
    title:'CLOSE',
    bottom:5,
    height:40
});

page2.add(b2);

b2.addEventListener('click',function()
{
    page2.close();
});

var win = Titanium.UI.createWindow({  
    title:'win',
    backgroundColor:'#555'
});

var button = Titanium.UI.createButton({
    title:'OPEN'
});

button.addEventListener('click',function()
        {
            page2.open();
        });
        
win.add(button);

win.open();
2. Press "Open" button Expected: Should see tableView rows with data Actual: Data is missing

Comments

  1. Karl Rowley 2012-10-11

    This works with the fix for [TIMOB-11320]. I"m going to close as a duplicate.
  2. Karl Rowley 2012-10-11

    Duplicate of [TIMOB-11320]
  3. Tamila Smolich 2012-10-17

    Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)

JSON Source