{ "id": "160498", "key": "AC-3658", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-05-29T10:15:55.000+0000", "created": "2016-05-25T11:06:26.000+0000", "labels": [ "android-4.4" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-05-29T10:15:55.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I have a view named \"pie\" and I set a height, but when I get his height after postlayout event this value is different.\r\n\r\nTest device: Android 4.4 Samsung Core 2\r\ncontroller.xml\r\n{code:java}\r\n\r\n \r\n\r\n{code}\r\n\r\ncontroller.tss\r\n{code:java}\r\n\"#pie\":{\r\n height: 47\r\n}\r\n{code}\r\n\r\ncontroller.js\r\n\r\n{code:java}\r\n$.board.addEventListener('postlayout', function(e){\r\n Ti.API.info(\"## Pie height: \" + $.pie.size.height);\r\n});\r\n{code}\r\n\r\n\r\nLog:\r\n\"## Pie height: 5\"", "attachment": [], "flagged": false, "summary": "Android - Wrong view size", "creator": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.11.4\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 4294967296\r\nNode.js\r\n Node.js Version = 0.12.7\r\n npm Version = 2.11.3\r\nTitanium CLI\r\n CLI Version = 5.0.6\r\nTitanium SDK\r\n SDK Version = 5.4.0.v20160425220956\r\n SDK Path = /Users/amurcia/Library/Application Support/Titanium/mobilesdk/osx/5.4.0.v20160425220956\r\n Target Platform = android", "comment": { "comments": [ { "id": "386759", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~amurcia],\r\n\r\nThanks for reaching out. To identify the cause of the issue we need to reproduce it. For that please provide full test code that we can run and reproduce the issue. Once the problem is identified we will be able to give you solution.\r\n\r\nRegards", "updateAuthor": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-05-25T11:31:26.000+0000", "updated": "2016-05-25T11:31:26.000+0000" }, { "id": "386760", "author": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "body": "You have the test code in the description", "updateAuthor": { "name": "amurcia", "key": "amurcia", "displayName": "Anna", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-25T11:32:48.000+0000", "updated": "2016-05-25T11:32:48.000+0000" }, { "id": "386764", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~amurcia],\r\nThe code you provided seems to be part of a full project. I was wondering if the view has parent or not. Please let us know if the given code reproduces the issue or something else is needed to add.\r\nThanks for your co-operation ", "updateAuthor": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-05-25T11:47:58.000+0000", "updated": "2016-05-25T11:47:58.000+0000" }, { "id": "386875", "author": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\nI have tested the issue in my environment and found that {{view.size.height}} gives correct result. Here is my log for the following code.\r\n*Log:*\r\n{code}\r\n[INFO] : ## Pie height: 47\r\n[INFO] : ## Pie height: 47\r\n{code}\r\n*index.xml:*\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t \r\n\t\t\r\n\t\r\n\r\n{code}\r\n*index.js:*\r\n{code}\r\n$.board.addEventListener('postlayout', function(e){\r\n\r\n Ti.API.info(\"## Pie height: \" + $.pie.size.height);\r\n\r\n});\r\n\r\n\r\n$.index.open();\r\n{code}\r\n*index.tss:*\r\n{code}\r\n\".container\": {\r\n\tbackgroundColor:\"white\"\r\n}\r\n\r\n\"#pie\":{\r\n\r\n height: 47\r\n\r\n}\r\n{code}\r\n\r\n*Environment*:\r\n\r\n*Device info:* Nexus7 (android 6.0.1)\r\n*Node.js Version:* 0.12.7\r\n*npm Version:* 2.11.3\r\n*Titanium SDKs:* 5.2.2.GA and 5.4.0.v20160509133737\r\n*Java Development Kit Version:* 1.8.0_73\r\n*Titanium CLI Version:* 5.0.5\r\n*Appcelerator CLI Version:* 5.2.2\r\n*Appcelerator Studio:* 4.5.0", "updateAuthor": { "name": "nsalahin", "key": "nsalahin", "displayName": "Nazmus Salahin", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2016-05-26T08:28:14.000+0000", "updated": "2016-05-29T10:15:25.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }