{ "id": "176300", "key": "TIMOB-28547", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "sprint": { "id": 1232, "state": "future", "name": "2021 Sprint 21", "originBoardId": 114 }, "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": "21249", "name": "Release 10.2.0", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-10-29T03:39:10.000+0000", "created": "2021-10-06T23:49:56.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "drawable", "menu", "menuitem", "resource", "theme" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-10-29T03:39:10.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": "*Summary:*\r\nWhen assigning a {{MenuItem}} \"icon\" property a res drawable integer ID, the app's theme is wrongly ignored. This is only an issue if the drawable uses a color attribute/style.\r\n\r\n*Notes:*\r\nThis is not an issue if the resource drawable has hard-coded colors.\r\n\r\n*Steps to reproduce:*\r\n# Use the below code as the \"app.js\".\r\n# Copy [^ic_baseline_delete_24.xml] to folder: {{./platform/android/res/drawable}}\r\n# Build and run on Android.\r\n\r\n{code:javascript}\r\nconst window = Ti.UI.createWindow();\r\nwindow.activity.onCreateOptionsMenu = (e) => {\r\n\tconst menuItem = e.menu.add({\r\n\t\ticon: Ti.App.Android.R.drawable.ic_baseline_delete_24,\r\n\t\tshowAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS,\r\n\t});\r\n\tmenuItem.addEventListener(\"click\", () => {\r\n\t\talert(\"Menu item clicked on.\");\r\n\t});\r\n};\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nIn the top-right corner, notice the delete/trash icon is always displayed white. When the \"light\" theme is shown, the menu item can't be seen. It shouldn't be shown as white in the dark theme either and should be gray like bottom navigation icons.\r\n !MenuIconLight-Bad.png|thumbnail! !MenuItemDark-Bad.png|thumbnail! \r\n\r\n*Expected Result:*\r\nFor the default Titanium light theme, the icon should be gray.\r\n !MenuIconLight-Good.png|thumbnail! !MenuItemDark-Good.png|thumbnail! \r\n", "attachment": [ { "id": "68021", "filename": "ic_baseline_close_24.xml", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-27T20:40:03.000+0000", "size": 420, "mimeType": "text/xml" }, { "id": "67992", "filename": "ic_baseline_delete_24.xml", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-06T23:42:56.000+0000", "size": 402, "mimeType": "text/xml" }, { "id": "67993", "filename": "MenuIconLight-Bad.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-06T23:52:20.000+0000", "size": 397133, "mimeType": "image/png" }, { "id": "67994", "filename": "MenuIconLight-Good.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-06T23:52:20.000+0000", "size": 398571, "mimeType": "image/png" }, { "id": "67995", "filename": "MenuItemDark-Bad.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-06T23:57:34.000+0000", "size": 401287, "mimeType": "image/png" }, { "id": "67996", "filename": "MenuItemDark-Good.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-06T23:57:34.000+0000", "size": 401203, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Menu item icon ignores theme if assigned a resource ID", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "459077", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/13106", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-07T00:15:36.000+0000", "updated": "2021-10-07T00:15:36.000+0000" }, { "id": "459140", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There's still an issue where menu icon wrongly uses the activity context's theme, when it should use the ActionBar context theme instead. This is an issue if you use the {{Theme.Titanium.Light}} theme because it uses the {{Theme.MaterialComponents.Light.DarkActionBar}} which sets the \"attr/colorControlNormal\" differently than the activity.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-27T19:59:33.000+0000", "updated": "2021-10-27T19:59:33.000+0000" }, { "id": "459141", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/13147", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-10-27T20:38:49.000+0000", "updated": "2021-10-27T20:38:49.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }