{ "id": "176330", "key": "TIMOB-28576", "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": "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-11-05T23:55:11.000+0000", "created": "2021-11-05T04:54:01.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ProgressIndicator", "android", "progress", "theme" ], "versions": [ { "id": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-11-05T23:55:14.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\nAs of Titanium 10.0.0, all UI was changed to use the material theme/widgets. The [Ti.UI.Android.ProgressIndicator|https://titaniumsdk.com/api/titanium/ui/android/progressindicator.html] dialog still wrongly uses a dark green color from the Holo Dark theme when it should use {{colorPrimary}} according to Google's material theme guidelines.\r\nhttps://material.io/components/progress-indicators/android#using-progress-indicators\r\n\r\n*Note:*\r\nThis is not an issue with the [Ti.UI.ProgressBar|https://titaniumsdk.com/api/titanium/ui/progressbar.html] view.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Android.\r\n# Tap on the \"Show Determinate Progress\" button.\r\n# Notice the progress bar is green instead of blue.\r\n# Tap on the \"Show Indeterminate Progress\" button.\r\n# Notice the progress circle is green instead of blue.\r\n\r\n{code:javascript}\r\nconst window = Ti.UI.createWindow({ layout: \"vertical\" });\r\nconst button1 = Ti.UI.createButton({\r\n\ttitle: \"Show Determinant Progress\",\r\n\ttop: 40,\r\n});\r\nbutton1.addEventListener(\"click\", () => {\r\n\tconst dialog = Ti.UI.Android.createProgressIndicator({\r\n\t\tmessage: \"Loading...\",\r\n\t\tvalue: 0,\r\n\t\tmin: 0,\r\n\t\tmax: 100,\r\n\t\tlocation: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,\r\n\t\ttype: Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT,\r\n\t});\r\n\tdialog.show();\r\n\tconst timerId = setInterval(() => {\r\n\t\tif (dialog.value < dialog.max) {\r\n\t\t\tdialog.value++;\r\n\t\t} else {\r\n\t\t\tdialog.hide();\r\n\t\t\tclearInterval(timerId);\r\n\t\t}\r\n\t}, 50);\r\n});\r\nwindow.add(button1);\r\nconst button2 = Ti.UI.createButton({\r\n\ttitle: \"Show Indeterminant Progress\",\r\n\ttop: 40,\r\n});\r\nbutton2.addEventListener(\"click\", () => {\r\n\tconst dialog = Ti.UI.Android.createProgressIndicator({\r\n\t\tmessage: \"Loading...\",\r\n\t\tlocation: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,\r\n\t\ttype: Ti.UI.Android.PROGRESS_INDICATOR_INDETERMINANT,\r\n\t});\r\n\tdialog.show();\r\n\tsetTimeout(() => {\r\n\t\tdialog.hide();\r\n\t}, 2000);\r\n});\r\nwindow.add(button2);\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nProgress bar wrongly uses the color green from the Holo Dark's theme.\r\n !Determinate-Bad.png|thumbnail! !Indeterminate-Bad.png|thumbnail! \r\n\r\n*Expected Result:*\r\nProgress bar should use theme's \"colorPrimary\" instead.\r\n !Determinate-Good.png|thumbnail! !Indeterminate-Good.png|thumbnail! \r\n\r\n*Work-Around:*\r\nSet the following color styles in your custom theme to change the dialog's progress bar color.\r\n{code:xml}\r\n\r\n\r\n\t\r\n\r\n{code}\r\n", "attachment": [ { "id": "68031", "filename": "Determinate-Bad.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-05T04:52:53.000+0000", "size": 432322, "mimeType": "image/png" }, { "id": "68033", "filename": "Determinate-Good.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-05T04:52:53.000+0000", "size": 432372, "mimeType": "image/png" }, { "id": "68030", "filename": "Indeterminate-Bad.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-05T04:52:53.000+0000", "size": 429130, "mimeType": "image/png" }, { "id": "68032", "filename": "Indeterminate-Good.png", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-05T04:52:51.000+0000", "size": 429379, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: ProgressIndicator dialog does not use material \"colorPrimary\"", "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": "459156", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/13167", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-11-05T05:10:10.000+0000", "updated": "2021-11-05T05:10:10.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }