Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12788] BlackBerry: Support Custom Table View Rows

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-03T23:01:25.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 11 BB, 2013 Sprint 11, Release 3.1.2, Release 3.2.0
ComponentsBlackBerry
Labelsqe-3.1.2, qe-testadded
ReporterRussell McMahon
AssigneeJosh Roesslein
Created2013-02-19T21:38:27.000+0000
Updated2013-08-12T20:09:06.000+0000

Description

Test case:
var win = Ti.UI.createWindow({
    backgroundColor : 'white',
    layout : 'vertical'
});

var tableData = [];
var i;
for ( i = 0; i < 10; i++) {

    var row = Ti.UI.createTableViewRow({
        className : 'customRow',
        selectedBackgroundColor : 'white',
        rowIndex : i, 
        height : 110
    });

    var labelUserName = Ti.UI.createLabel({
        color : '#576996',
        font : {
            fontFamily : 'Arial',
            fontSize : 20,
            fontWeight : 'bold'
        },
        text : 'Header line ' + i,
        left : 0,
        top : 6,
        width : '100%',
        height : 30
    });

    row.add(labelUserName);

    var labelDetails = Ti.UI.createLabel({
        color : '#222',
        font : {
            fontFamily : 'Arial',
            fontSize : 12,
            fontWeight : 'normal'
        },
        text : 'Text line ' + i,
        left : 0,
        top : 44,
        width : '100%'
    });

    row.add(labelDetails);

    tableData.push(row);

}

var tableView = Ti.UI.createTableView({
    backgroundColor : 'white',
    data : tableData
});

tableView.addEventListener('click', function(e) {
    Ti.API.info("row click index =" + e.index);
    Ti.API.info('row click rowData = ' + e.rowData);
});

win.add(tableView);

win.open();

Comments

  1. Lokesh Choudhary 2013-08-12

    Verified the fix & now we can implement custom table view rows. Thus closing. Environment: Appcel Studio : 3.1.2.201308082014 Ti SDK : 3.1.2.v20130809141556 Mac OSX : 10.8.4 Alloy : 1.2.0-alpha6 CLI - 3.1.2-alpha win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88

JSON Source