Problem description
When adding a TableView with { height: Ti.UI.SIZE, style: Ti.UI.iPhone.TableViewStyle.GROUPED }, the height of the view is calculated incorrectly and results in a "cut-off" tableview.
Steps to reproduce
Use the following code to see the bug:
var win = Ti.UI.createWindow({
title : 'Multiple tableviews',
layout : 'vertical',
backgroundColor : '#ffffff'
});
var scrollview = Ti.UI.createScrollView({
top : 0,
width : Ti.UI.FILL,
height : Ti.UI.FILL,
layout : 'vertical'
});
win.add(scrollview);
var tableview1 = Ti.UI.createTableView({
backgroundColor : '#ffffff',
scrollable : false,
style : Ti.UI.iPhone.TableViewStyle.GROUPED,
data : [{
title : 'Row 1'
}, {
title : 'Row 2'
}, {
title : 'Row 3'
}],
height : Ti.UI.SIZE
});
scrollview.add(tableview1);
var img = Ti.UI.createImageView({
image : 'http://cloud.appcelerator.net/cb0dbcc6-6fe3-4206-a32e-cf266c80aa3d/default_app_logo.png',
width : 320,
height : 320
});
scrollview.add(img);
var tableview2 = Ti.UI.createTableView({
backgroundColor : '#ffffff',
scrollable : false,
//style: Ti.UI.iPhone.TableViewStyle.GROUPED,
data : [{
title : 'Row 4'
}, {
title : 'Row 5'
}, {
title : 'Row 6'
}],
height : Ti.UI.SIZE
});
scrollview.add(tableview2);
win.open();
The window contains a scrollview with layout vertical and three subviews (a non-scrollable tableview with grouped rows (incorrect height), an image and another non-scrollable tableview (not grouped, correct height).
A scrollview is used to make sure the window with all three subviews can be scrolled, and not the individual tableviews.
Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and 3.2 CI.