{ "id": "172194", "key": "TIMOB-26379", "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": "2018-09-07T09:32:05.000+0000", "priority": null, "labels": [ "9patch", "Android", "engSchedule" ], "versions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2019-06-07T23:49:04.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "I've created a few nine-patch images as backgrounds for buttons, but they seem to stretch in height when rendering on 2 tested Samsung devices (SM-G960F Galaxy s9, SM-G920F Galaxy s6). I've fixed the height of the button, so they shouldn't stretch.\r\n\r\nI've tested this on a few other devices and emulators and Android versions and the rendering seems to be ok on those (HTC One M7, LG Nexus 5x)\r\n\r\nI've also tested the images in a native Android application and then they do render correctly on *all* devices.\r\n\r\nSM-G960F uses xxhdpi\r\nSM-G920F uses xxxhdpi\r\n\r\nI've attached images for xxhdpi and xxxhdpi\r\n\r\nExample:\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\nvar v = Ti.UI.createView({\r\n height: Ti.UI.SIZE,\r\n layout: 'vertical'\r\n});\r\n\r\n_.each(['button_background_primary.png', 'button_background_secondary.png', 'button_background_secondary_left.png'], function(image) {\r\n v.add(Ti.UI.createView({\r\n top: 5,\r\n width: 150,\r\n title: \"TEST\",\r\n backgroundImage: \"/images/\" + image,\r\n height: 44\r\n }));\r\n});\r\n\r\nwin.add(v);\r\n\r\nwin.open();\r\n{code}\r\n\r\n", "attachment": [ { "id": "65513", "filename": "app.zip", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T12:43:26.000+0000", "size": 8524521, "mimeType": "application/zip" }, { "id": "65509", "filename": "button_background_primary.9.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:19:15.000+0000", "size": 2285, "mimeType": "image/png" }, { "id": "65512", "filename": "button_background_primary.9.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:19:15.000+0000", "size": 1229, "mimeType": "image/png" }, { "id": "65507", "filename": "button_background_secondary_left.9.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:19:15.000+0000", "size": 3728, "mimeType": "image/png" }, { "id": "65510", "filename": "button_background_secondary_left.9.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:19:15.000+0000", "size": 2770, "mimeType": "image/png" }, { "id": "65508", "filename": "button_background_secondary.9.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:19:15.000+0000", "size": 5166, "mimeType": "image/png" }, { "id": "65511", "filename": "button_background_secondary.9.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:19:15.000+0000", "size": 2787, "mimeType": "image/png" }, { "id": "65506", "filename": "expected_lg_5x.png", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:25:38.000+0000", "size": 38749, "mimeType": "image/png" }, { "id": "65505", "filename": "result_sm-g960f.jpg", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T09:31:30.000+0000", "size": 73368, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Nine-patch images not rendering correctly on Samsung devices", "creator": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 7.0.0.GA - 7.3.0.GA, Android 7-8, SM-G960F, SM-G920F", "comment": { "comments": [ { "id": "441406", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Your sample code is not clear to regenerate the issue. please provide a reproducible sample project with the resources in it. Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-09-07T12:38:00.000+0000", "updated": "2018-09-07T12:38:00.000+0000" }, { "id": "441407", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Example with resources: [^app.zip] ", "updateAuthor": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-09-07T12:43:52.000+0000", "updated": "2018-09-07T12:43:52.000+0000" }, { "id": "441473", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "I was able to reproduce the issue on Samsung S7 and S8 devices.", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2018-09-11T13:42:43.000+0000", "updated": "2018-09-11T13:42:43.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }