{ "id": "173984", "key": "TIMOB-27312", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "2019-08-06T21:57:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ProgressIndicator", "android", "progress", "statusbar" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-02-22T18:41:03.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": "*Summary:*\r\nThe {{Ti.UI.Android.ProgressIndicator}} whose \"location\" property is set to {{Ti.UI.Android.PROGRESS_INDICATOR_STATUS_BAR}} no longer displays a progress indicator in the activity window's {{ActionBar}}. This feature no longer works.\r\n\r\nThe {{ProgressIndicator}} object's defaults to using the status bar, making this an issue. All Titanium developers need to set it to {{Ti.UI.Android.PROGRESS_INDICATOR_DIALOG}} to see progress. This is the only \"location\" property setting that works.\r\n\r\n*Reason:*\r\nGoogle has stopped supporting this feature as of Android 5.0.\r\nhttps://developer.android.com/reference/android/app/Activity#setProgress(int)\r\n\r\nThis feature does not work on Android 4.4 either. Likely because the Google Support library's {{ActionBar}} and/or {{AppCompatActivity}} class dropped support of this feature as well.\r\n\r\n*Test Code:*\r\nThe below code does *NOT* show a progress indicator on Android 4.4 and above anymore. This feature appears to be dead.\r\n{code:javascript}\r\nvar progressIndicator = Ti.UI.Android.createProgressIndicator({\r\n\tmessage: \"Progressing...\",\r\n\tlocation: Ti.UI.Android.PROGRESS_INDICATOR_STATUS_BAR,\r\n\ttype: Ti.UI.Android.PROGRESS_INDICATOR_INDETERMINANT,\r\n});\r\n\r\nvar window = Ti.UI.createWindow();\r\nwindow.add(Ti.UI.createLabel({ text: \"Progress Indicator Test\" }));\r\nwindow.addEventListener(\"open\", function() {\r\n\tprogressIndicator.show();\r\n});\r\nwindow.open();\r\n{code}\r\n\r\n*Recommended Solution:*\r\nWe should do one of the following...\r\n# Find an alternative solution for showing progress in the action bar or status bar. _(Note that Google's guidelines do not recommend this anymore.)_\r\n# Drop status bar progress support and have \"location\" default to showing a dialog.\r\n\r\nIf we remove the status bar feature, then we may want to remove the {{TiBaseActivity.requestWindowFeature()}} method calls for constants {{FEATURE_PROGRESS}} and {{FEATURE_INDETERMINATE_PROGRESS}} here...\r\n[TiBaseActivity.java#L694|https://github.com/appcelerator/titanium_mobile/blob/3386d95fb6203138428f1dcc4736448a569692bc/android/titanium/src/java/org/appcelerator/titanium/TiBaseActivity.java#L694]\r\n", "attachment": [], "flagged": false, "summary": "Android: Refactor \"ProgressIndicator\" status bar handling", "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": [], "maxResults": 1, "total": 1, "startAt": 0 } } }