Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8688] Android: Setting a border on a View inside a TableViewRow fills the entire View

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-05-25T12:28:55.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-11 API
ComponentsAndroid
Labelsandroid, api, qe-testadded
ReporterOpie Cyrus
AssigneePing Wang
Created2012-04-11T15:16:51.000+0000
Updated2012-07-12T13:47:52.000+0000

Description

When setting a border on a view inside a tableview row, the view is filled by the border color same as if you set backgroundColor on the view. Test case:
var win  = Ti.UI.createWindow({
	backgroundColor:'#000',
});

var table = Ti.UI.createTableView({
		backgroundColor:'transparent',
		separatorColor:'transparent',
});

var varHeightRow = Ti.UI.createTableViewRow({
	backgroundColor:'#FFF',
	//height:Ti.UI.SIZE,
	layout:'vertical',
	selectionStyle:Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE
});

var rowContent = Ti.UI.createView({
	height:20,
	left:5,
	right:5,
	top:10,
	bottom:10,
	borderColor:'#C00',
	borderWidth:1,
});

var contentContent = Ti.UI.createLabel({
	backgroundColor: 'white',
	text:'This is a test'
});

rowContent.add(contentContent);

varHeightRow.add(rowContent);

table.appendRow(varHeightRow);
win.add(table);

Comments

  1. Shannon Hicks 2012-04-11

    Setting backgroundColor:'transparent' on the view does not provide a workaround, either.
  2. Arthur Evans 2012-05-22

    This appears to be the same issue as TIMOB-8956.
  3. Vishal Duggal 2012-05-25

    https://github.com/appcelerator/titanium_mobile/pull/2244
  4. Natalie Huynh 2012-06-14

    Tested with 2.1.0.v20120614102250 on Droid 3 2.3.4

JSON Source