{ "id": "79681", "key": "TIMOB-5120", "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": "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": "2013-03-21T17:26:37.000+0000", "created": "2011-08-26T11:33:10.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "exalture" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "17537", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "92294", "key": "TIMOB-9226", "fields": { "summary": "Android: Review composite layout feature requests", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2017-03-21T21:29:40.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": "h3.Problem\r\nThe Horizontal layout does not work correctly, it adds extra padding on the top. On iOS works correctly. Please take a look at the screenshots I posted within this issue.\r\n\r\nh3.Regression\r\nPlease run the code below(I attached project with example image). After running you would show a blue space which is the views background color. The images should start filling the view from the top-left (like in iOS).\r\n\r\nh3.Sample Code\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nPlatformWidth = Ti.Platform.displayCaps.platformWidth;\r\nPlatformHeight = Ti.Platform.displayCaps.platformHeight;\r\n$X = function(x) { return Math.round(x*(PlatformWidth/320)); }\r\n$Y = function(y) { return Math.round(y*(PlatformHeight/480)); }\r\n\r\nvar win1 = Titanium.UI.createWindow({backgroundColor:'#fff' });\r\n\r\n\r\n\r\nvar grid = Ti.UI.createView({left: $X(7), right: $X(7), layout: 'horizontal', borderRadius:5, backgroundColor:\"blue\", height:$Y(3*79)});\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\r\ngrid.add(Ti.UI.createButton({ width: $X(101), height: $Y(78), backgroundImage: 'places.png' }));\t\t\t\t\r\n\t\r\nwin1.add(grid);\r\n\r\nwin1.open();\r\n{code}", "attachment": [ { "id": "22697", "filename": "AndroidHorizontal.zip", "author": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T11:33:10.000+0000", "size": 2556110, "mimeType": "application/zip" }, { "id": "22695", "filename": "urg1.png", "author": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T11:33:10.000+0000", "size": 65088, "mimeType": "image/png" }, { "id": "22696", "filename": "urg2.png", "author": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T11:33:10.000+0000", "size": 123794, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Horizontal layout adds extra padding on the top", "creator": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kpomaski", "key": "kpomaski", "displayName": "Karol Pomaski", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 2.3.3, Simulator", "comment": { "comments": [ { "id": "196571", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Layout bug confirmed with 2.1.0 master builds.", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-30T14:10:24.000+0000", "updated": "2012-05-30T14:10:24.000+0000" }, { "id": "243445", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I cannot reproduce this issue.\r\nTried with SDK 3.1.0", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-03-21T17:26:38.000+0000", "updated": "2013-03-21T17:26:38.000+0000" }, { "id": "414452", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:29:40.000+0000", "updated": "2017-03-21T21:29:40.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }