{ "id": "155245", "key": "TIMOB-20538", "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": null, "resolutiondate": null, "created": "2016-03-01T15:17:34.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:55:27.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "h3. Steps To Reproduce: \r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\n\tvar lineContainer = Ti.UI.createView({\r\n\t\twidth: '100%', //set width to difference values, for example: 50%, 99%\r\n\t\theight: 20,\r\n\t\tbackgroundColor:'red'\r\n\t});\r\n\t\r\n\t\tvar line = Ti.UI.createImageView({\r\n\t\t\timage: '/images/linia_poziom.png',\r\n\t\t\twidth: '100%'\r\n\t\t});\r\n\t\t\r\n\t\tlineContainer.add(line);\r\n\t\t\r\n\twindow.add(lineContainer);\r\n\r\nwindow.open();\r\n{code}\r\n\r\nh3. Actual Results\r\nIf containingView width is set to other value than '100% percent then child ImageView adds space on left and right. Can be seen in attachments. Name corresponds to width value.\r\n\r\nI couldn't reproduce this error with 'http://www.appcelerator.com.s3.amazonaws.com/enterprisesurvey/images/appcelerator-logo.png', so I am sending my file (linia_poziom.png) for xxhdpi resource file to help to track this bug.\r\n", "attachment": [ { "id": "58379", "filename": "100%.png", "author": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T15:14:20.000+0000", "size": 2575, "mimeType": "image/png" }, { "id": "58381", "filename": "50%.png", "author": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T15:14:20.000+0000", "size": 3437, "mimeType": "image/png" }, { "id": "58380", "filename": "99%.png", "author": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T15:14:20.000+0000", "size": 3487, "mimeType": "image/png" }, { "id": "58378", "filename": "linia_poziom.png", "author": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T15:16:44.000+0000", "size": 326, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ImageView add margins if containing view width is not 100%", "creator": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "MacOS,\r\nGenyMotion Emulator (Google Nexus 5 - Android 5.1.0.)\r\nSDK 5.1.2", "comment": { "comments": [ { "id": "378322", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I tried to test your code. I used your linia_poziom.png as line image. Here is the observation I got. I tested with SDK 5.2.0.GA.\r\n\r\n1. When lineContainer width is 100%, line image looks to be getting stretched and takes the full width.\r\n2. When lineContainer width is 50%, line image looks to be thinner and leaves spaces on left and right.\r\n3. When lineContainer width is 40%, line image takes the full width.\r\n4. When lineContainer width is 30%, line image is not visible.\r\n\r\nThanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-03-01T16:27:32.000+0000", "updated": "2016-03-01T16:27:32.000+0000" }, { "id": "383782", "author": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nThis issue not only depends on the width property set by user, but also on width of the device. On some device (1920x1080 it may look ok, but on 480x320 it may take just half of the device screen).\r\n\r\nThanks.", "updateAuthor": { "name": "CREATIVE KAIZEN", "key": "creative kaizen", "displayName": "CREATIVE KAIZEN", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-25T09:51:11.000+0000", "updated": "2016-04-25T09:51:11.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }