{ "id": "160600", "key": "TIMOB-23451", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2018-12-11T08:39:16.000+0000", "created": "2016-05-28T05:26:14.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "17993", "description": "Release 5.2.2", "name": "Release 5.2.2", "archived": false, "released": true, "releaseDate": "2016-04-05" } ], "issuelinks": [], "assignee": null, "updated": "2018-12-11T08:39:16.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Hello, Below is a test case which demonstrates the issue. \r\n{code}\r\nvar window = Ti.UI.createWindow( {\r\n 'width' : '100%',\r\n 'height' : '100%'\r\n} );\r\n\r\nwindow.addEventListener( 'click', function ( event ) {\r\n\r\n console.log( 'x: ' + Math.round( event.x ) );\r\n console.log( 'y: ' + Math.round( event.y ) );\r\n\r\n console.log( 'window width: ' + event.source.rect.width );\r\n console.log( 'window height: ' + event.source.rect.height );\r\n\r\n console.log( 'screen width: ' + Ti.Platform.displayCaps.platformWidth );\r\n console.log( 'screen height: ' + Ti.Platform.displayCaps.platformHeight );\r\n} );\r\n\r\nwindow.open();\r\n{code}\r\n\r\nAs the window width and height is 100% to the device screen, The value of \r\n{code}\r\nconsole.log( 'window width: ' + event.source.rect.width );\r\n{code}\r\nand \r\n{code}\r\nconsole.log( 'screen width: ' + Ti.Platform.displayCaps.platformWidth );\r\n{code}\r\n\r\nshould be same. Also, same goes for height values. \r\n\r\nh5.Tested Environment:\r\n\r\nSDK: 5.2.2.GA\r\nAndroid 4.4.2\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Window rect attribute return wrong device height and width value", "creator": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "environment": null, "comment": { "comments": [ { "id": "387208", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Window's height is different than displayCaps height because of the title bar. As you can see, the window isn't exactly fullscreen. The width return are identical.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-31T20:19:47.000+0000", "updated": "2016-05-31T20:19:47.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }