{ "id": "174633", "key": "TIMOB-27721", "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": [ { "id": "21018", "name": "Release 9.0.2", "archived": false, "released": true, "releaseDate": "2020-05-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-05-04T12:49:03.000+0000", "created": "2020-01-19T19:12:01.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ImageView", "android", "breaking-change", "image", "mask", "parity", "tintColor" ], "versions": [ { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" }, { "id": "20972", "description": "", "name": "Release 8.3.1", "archived": false, "released": true, "releaseDate": "2020-01-17" } ], "issuelinks": [ { "id": "58355", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174988", "key": "TIMOB-27881", "fields": { "summary": "Android: ImageView tintColor has no effect", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-05-07T15:37:05.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": "This is an issue that took us a while to track down. And thanks to @miga for the additional check! \r\n\r\nThe issue is that the {{tintColor}} property of the {{Ti.UI.ImageView}} multiply the provided color, instead of actually replacing the color. This results in an unexpected behavior, since the provided color is not what you actually see. This works well on iOS (which is where the {{tintColor}} API was introduced first and should be followed here. For other masks, the {{Ti.UI.MaskedImage}} can be used, but we need strong parity here!\r\n\r\nExample:\r\n{code:js}\r\nconst window = Ti.UI.createWindow();\r\nconst icon = Ti.UI.createImageView({\r\n tintColor: 'red',\r\n width: 30,\r\n image: 'example.png'\r\n});\r\nwindow.add(icon);\r\nwindow.open();\r\n{code}\r\n\r\n*Work-Around:*\r\nUse a {{Ti.UI.MaskedImage}} instead.\r\n{code:js}\r\nconst window = Ti.UI.createWindow();\r\nconst icon = Ti.UI.createMaskedImage({\r\n mask: 'example.png',\r\n tint: 'red',\r\n width: 30,\r\n});\r\nwindow.add(icon);\r\nwindow.open();\r\n{code}\r\n\r\n", "attachment": [ { "id": "67237", "filename": "example.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-01-19T19:11:46.000+0000", "size": 2355, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Ti.UI.ImageView#tintColor is multiplied, not replaced (like iOS)", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Latest master", "comment": { "comments": [ { "id": "453748", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/11441", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-01-19T19:14:42.000+0000", "updated": "2020-01-19T19:14:42.000+0000" }, { "id": "455277", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed for Master, awaiting backport for 9_0_X. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-04-28T13:38:20.000+0000", "updated": "2020-04-28T13:38:20.000+0000" }, { "id": "455280", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 9.1.0 target, cherry-picked commit (c2633b0a98cf9d4c9c2005e4ed7aeb034a3da794) to 9_0_X for 9.0.2 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-04-28T13:44:36.000+0000", "updated": "2020-04-28T13:44:36.000+0000" }, { "id": "455343", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Fix verified in SDK version 9.1.0.v20200501090150 and 9.0.2.v20200430111828 \r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11441", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-04T12:48:53.000+0000", "updated": "2020-05-04T12:48:53.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }