[TIMOB-2125] Android: Tableview Drawn Offscreen in Lightweight Window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-08-22T14:15:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Don Thorp |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:11:10.000+0000 |
Updated | 2017-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});
Tested on a Samsung Galaxy S2 using TiSDK 2.2.0v20120821095711, unable to reproduce the issue. Ticket marked as resolved.
Closing ticket as the issue cannot be reproduced and due to the above comments.