[TIMOB-5238] Android: remove padding on sides of tableView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-18T11:17:45.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | Sprint 2011-41, Release 1.8.0 |
Components | Android |
Labels | module_tableview, qe-testadded |
Reporter | Jon Alter |
Assignee | Allen Yeung |
Created | 2011-09-08T23:25:24.000+0000 |
Updated | 2014-06-19T12:46:18.000+0000 |
Description
Remove the padding on the sides of the tableView
Attached are screen shots of the padding or lack there of on ios and android.
Step 1: run the code below
Step 2: see the white to the right and left of the red tableViewRow
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var row = Titanium.UI.createTableViewRow();
var view = Titanium.UI.createView({backgroundColor:'red',height:50});
row.height = 'auto';
row.add(view);
var data = [row];
var table = Titanium.UI.createTableView({data:data});
win.add(table);
win.open();
Associated Helpdesk Ticket
http://appc.me/c/APP-459375Attachments
File | Date | Size |
---|---|---|
android.jpg | 2011-09-08T23:25:24.000+0000 | 24959 |
iphone.jpg | 2011-09-08T23:25:24.000+0000 | 19414 |
Please solve it. It is a big problem for us. Are there some way to fix it by me? Thanks in advance. I wait you contact, Thanks. Pablo.
I found my own work around to this issue. Try adding your tableview to a view that is the entire width of the window and set the left and right to '-5px' or '-5dp'. that gave me the result I was looking for.
Tested with 1.8.0.1.v20111205164258 v8/rhino on Galaxy 10.1 (3.1) Droid 1 (2.2.2) Nexus S (2.3.6) Emulator (4.0)