[TIMOB-7784] Android: TableView shows only partial rows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-08T17:44:26.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 2.0.0, Release 1.8.1 |
Fix Version/s | Sprint 2012-05, Release 2.0.0 |
Components | Android |
Labels | qe-testadded |
Reporter | Nikhil Sharma |
Assignee | Hieu Pham |
Created | 2012-02-22T17:30:40.000+0000 |
Updated | 2012-03-09T10:42:01.000+0000 |
Description
If you create a view with 100% width, height, and have this view add top view and table, it will only show partial rows. I've created 50 rows in the code but when I scroll down t shows only 48 rows.
Repro Steps
1. Run the below code. 2. Scroll down to the bottom only 48 rows are visible. There should be 50 rows.
var window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
// draw a view that fills the window and set its layout property
var view = Ti.UI.createView({
backgroundColor:'transparent',
top:0,
left:0,
width:'100%',
height: '100%',
layout:'vertical'
});
var tbl_data = [];
for (var i = 0; i < 50; i++) {
var row = Ti.UI.createTableViewRow();
var label = Ti.UI.createLabel({
left: 10,
text: 'Row ' + (i+1)
});
row.add(label);
tbl_data.push(row);
}
var view1 = Ti.UI.createView({
backgroundColor:'red',
top:0,
left:0,
width:100,
height:100,
layout:'vertical'
});
// now assign that array to the table's data property to add those objects as rows
var table = Titanium.UI.createTableView({
//top: 100,
height: 'auto',
data:tbl_data
});
view.add(view1);
view.add(table);
window.add(view);
window.open();
Tested with Droid 3 2.3.4 with 2.0.0.v20120308234731