[TIMOB-23456] Using "rect" TableViewRow height and width values are always 0
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | n/a |
| Reporter | Anna |
| Assignee | Unknown |
| Created | 2016-05-24T09:57:40.000+0000 |
| Updated | 2018-02-28T19:55:50.000+0000 |
Description
All of the values in TableViewRow height and width are always 0.
Test case:
<TableView id="table">
<TableViewRow id="row>
<Label> Hello world! </Label
</TableViewRow>
</TableView>
$.table.addEventListener('postlayout', function (e){
Ti.API.info("# Row height: " + $.row.rect.height);
});
Log result:
Hello, I am able to reproduce this issue. For the given code I get the following log.
*index.xml:**index.tss:*<Alloy> <Window class="container"> <TableView id="table"> <TableViewRow id="row"> <Label> Hello world! </Label> </TableViewRow> </TableView> </Window> </Alloy>*index.js:*".container": { backgroundColor:"white" } "Label": { width: Ti.UI.SIZE, height: Ti.UI.SIZE, color: "#000" }*Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.4.0.v20160509133737 *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0$.table.addEventListener('postlayout', function (e){ Ti.API.info("# Row height: " + $.row.rect.height); }); $.index.open();Hello, I can reproduce the issue when there is no height is defined in the TableViewRow. But when a height is defined in TableViewRow, I can get the height in "postlayout" as Ti.API.info("# Row height: " + $.row.height); Regards, Sharif.