Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2125] Android: Tableview Drawn Offscreen in Lightweight Window

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-08-22T14:15:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterDon Thorp
AssigneeNeeraj Gupta
Created2011-04-15T03:11:10.000+0000
Updated2017-03-21T22:31:43.000+0000

Description

The problem is the window size it apparently taken from the backgroundImage size and therefore draws offscreen. I took a 300x380 bitmap and it draws correctly. When I rotate to landscape you see that's it's coordinates are off.

10-19 13:57:31.255: DEBUG/LAYOUT(1068): (main) [1,15307] ti.modules.titanium.ui.widget.tableview.TiTableView {0,-61,480,331}

Rotating it back to portrait

10-19 13:57:31.485: DEBUG/LAYOUT(1068): (main) [1,15539] ti.modules.titanium.ui.widget.tableview.TiTableView {0,0,320,430}
var win = Ti.UI.createWindow({ 
    backgroundImage : 'images/background.png'
});

var tableView = Ti.UI.createTableView({ backgroundColor : 'blue'  });
win.add(tableView);
 
var row = Ti.UI.createTableViewRow({
    height: 40,
    className: 'messageSelectionRow'           
});
var image = Ti.UI.createImageView({ 
    left: 5, 
    top: 5, 
    width: 'auto',
    height: 'auto',
    image: 'media/appcelerator_small.png'
});
var label = Ti.UI.createLabel({ 
    left: 30, 
    top: 5,
    width: 'auto',
    height: 'auto', 
    textAlign:'left', 
    color:'#FFFFFF', 
    text: 'title'
});
row.add(image);
row.add(label);
tableView.appendRow(row);
win.open({ animated : false});

Comments

  1. Junaid Younus 2012-08-22

    Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, unable to reproduce the issue. Ticket marked as resolved.
  2. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source