[TIMOB-8689] Android: Setting height to Ti.UI.SIZE on a TableViewRow causes the row to not display
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-10-13T00:36:47.000+0000 |
Affected Version/s | Release 2.0.0, Release 3.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 API, Release 2.1.3, Release 3.0.0, Release 3.1.0, 2012 Sprint 21 Core, 2012 Sprint 21 |
Components | Android |
Labels | android, core, module_tableviewrow, qe-and090112, qe-and100112, qe-review, qe-testadded, regression |
Reporter | Opie Cyrus |
Assignee | Allen Yeung |
Created | 2012-04-11T15:25:05.000+0000 |
Updated | 2012-12-21T19:41:33.000+0000 |
Description
Setting height to Ti.UI.SIZE on a tableview row causes the row to not display.
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);
win.open();
Also observed with a customer. His code sample.
PR https://github.com/appcelerator/titanium_mobile/pull/2320
Tested with Droid 3 2.3.4 and Emulator 2.2 with 2.1.0.v20120614102250
Reopening issue. Tested on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120918170114 Device: Nexus 7 (4.1.1) This is regression. Does not occur on 2.1.2.
I have a similar issue, but the *Ti.UI.SIZE* is set in view.height then placed in a TableViewRow (see below). *Tested on:* Titanium Studio, build: 2.1.2.201208301612 SDK build: 2.1.3.v20120918170114 Device: Droid 1 (2.2.3), Galaxy Nexus (4.0.4), Nexus S (4.1.1) *Bug does not occur in 2.1.2.GA* *The code:* \\
The regression is caused by the border. Should be fixed by [PR#2980](https://github.com/appcelerator/titanium_mobile/pull/2980).
PR is against 3.0.0, not 2.1.3. I believe we may need a different PR.
The backport PR: https://github.com/appcelerator/titanium_mobile/pull/3006
Verified fix with: osx Mountain Lion 10.8.1 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120920154617 Titanium SDK, build: 3.0.0.v20120921144915 Device: Galaxy S3 (4.0.4)
Reopening issue, since the row is not displayed. Tested on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 3.0.0.201210090117 Titanium SDK, build: 3.0.0.v20121010184612 Device: Samsung Galaxy Nexus (4.1.1) Regression, does not occur on 2.1.3.
Looks like this is working on the latest version of master and 3_0_X.
Closing as fixed. Verified and tested on: Titanium Studio, build: 3.0.0.201210151149 Titanium SDK, builds: 3.0.0.v20121017100120; 3.1.0.v20121017102121 Device: Nexus 7 (4.1.1)