[TIMOB-8282] Android: TableViewRow - TableViewRow does not shrink to height of content
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-02T12:39:07.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-07 |
Components | Android |
Labels | api, parity, qe-and031912, qe-nfc |
Reporter | Wilson Luu |
Assignee | Ping Wang |
Created | 2012-03-24T13:43:33.000+0000 |
Updated | 2012-06-07T07:24:32.000+0000 |
Description
Steps to reproduce:
1. Run following code on Android:
var win = Ti.UI.createWindow();
win.backgroundColor = 'white';
var label = Ti.UI.createLabel({
text: 'Pass if table view row width fills and height sizes to the content',
top: 20,
left: 10,
height: 'auto',
width: 'auto',
color: 'black'
});
var table = Titanium.UI.createTableView({
top: 50
});
win.add(table);
var row = Titanium.UI.createTableViewRow();
var row1 = Titanium.UI.createTableViewRow();
var row2 = Titanium.UI.createTableViewRow();
var row3 = Titanium.UI.createTableViewRow();
var view1 = Titanium.UI.createView({backgroundColor:'red',width:50,height:20});
var view2 = Titanium.UI.createView({backgroundColor:'red',width:50,height:50});
var view3 = Titanium.UI.createView({backgroundColor:'red',width:50,height:100});
row1.add(view1);
row2.add(view2);
row3.add(view3);
table.appendRow(row);
table.appendRow(row1);
table.appendRow(row2);
table.appendRow(row3);
win.add(label);
win.open();
Actual: Top TableViewRow does not constrain to height of content. See attachment.
Expected: Top TableViewRow should constrain to height of content.
Note: Above code works as expected on iOS
Attachments
File | Date | Size |
---|---|---|
android.png | 2012-03-24T13:43:33.000+0000 | 32852 |
ios.png | 2012-03-24T13:43:33.000+0000 | 54082 |
Also occurs on: Device: Android Nexus S (2.3.6) Titanium Studio, build: 2.0.0.201203262445 SDK: 2.0.0.v20120325213306
this also occurs on Android Nexus 1(2.2.2) on Titanium mobilesdk-2.0.0.v20120325213306 Titanium Studio build: 2.0.0.201203262445
Also occurs on Kindle Fire and Nook Color Titanium SDK: 2.0.0.v20120325213306 Titanium Studio, build: 2.0.0.201203262445
Adding environment information Tested with Titanium SDK: 2.1.0.v20120606165259 Tested with Titanium Studio: 2.1.0.201206051612 Device: Android 2.2 and 4.0 Android Runtime: V8