Spacing between TableViewSections in Grouped TableView
Is there a way to decrease the spacing between each tableViewSection? In other words, can the padding on the top and bottom of each section be changed? Thanks in advance!
1 Answer
-
You need to create a view with the desired height and add it to the table view section like so :-
var tableSection = Ti.UI.createTableViewSection(); tableSection.headerView = Ti.UI.createView({height:8});
For table view at the top you also need to take into account the header for the table itself and do the same as above :-
var table = Titanium.UI.createTableView({ data:data, style:Titanium.UI.iPhone.TableViewStyle.GROUPED, backgroundColor:TABLE_BACKGROUND_COLOR }); table.headerView = Ti.UI.createView({height:1}) // height cannot be 0