Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2872] Adding label to a table view row doesnt come, scrolling the table view shows the label for a sec then goes away.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2011-10-20T12:12:45.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelstableview
Reportermanu ranjan
AssigneePaul Dowsett
Created2011-08-16T07:07:30.000+0000
Updated2016-03-08T07:47:49.000+0000

Description

I just created a label and put that in table view row inside a for loop , the label is not coming on the table view .When i scroll the table i can see the label for a flash and then it goes away
var win = Ti.UI.createWindow({
    backgroundColor: '#fff',
    modal: true
});
 
var title = [ 'one', 'two', '3' ], table_data = [];
 
for(var i=0;i<title.length;i++) {
 
    var direction_label=Titanium.UI.createLabel({
        color:'black',
        font:{ fontWeight:"normal" },
        left:10,
        top:0,
        text:title[i]
        });
 
    var thisRow = Ti.UI.createTableViewRow({
    className:"directiondata",
    layout:"vertical",
    height:75
    });
    thisRow.add(direction_label);
    table_data.push(thisRow);
 
}
 
var table = Titanium.UI.createTableView({data:table_data});
win.add(table);
 
win.open();

Attachments

FileDateSize
code.rtf2011-08-16T07:07:30.000+00001306

Comments

  1. Paul Dowsett 2011-09-18

    Manu I cannot reproduce this issue. Running the above code works fine for me. Have you resolved it? Thanks
  2. Paul Dowsett 2011-12-27

    Closing resolved tickets due to inactivity.

JSON Source