Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28351] Android: Update ProgressBars/ActivityIndicators to use material theme

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-03-05T15:56:50.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.0.0
ComponentsAndroid
LabelsActivityIndicator, ProgressIndicator, android, breaking-change, material-theme, progressbar
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-02-12T02:53:08.000+0000
Updated2021-03-11T02:19:44.000+0000

Description

*Summary:* We should replace our usage of the native Java [ProgressBar](https://developer.android.com/reference/android/widget/ProgressBar) with the material [LinearProgressIndicator](https://developer.android.com/reference/com/google/android/material/progressindicator/LinearProgressIndicator) and [CircularProgressIndicator](https://developer.android.com/reference/com/google/android/material/progressindicator/CircularProgressIndicator) classes. This effects the following Titanium APIs: * [Ti.UI.ActivityIndicator](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ActivityIndicator) * [Ti.UI.ProgressBar](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ProgressBar) *Note:* The material progress indicators are colored and sized differently compared to the older widgets. https://material.io/components/progress-indicators#linear-progress-indicators *Activity Indicator Test:* This can be tested with the attached [^ActivityIndicatorTest.js], which will display what's shown below. !ActivityIndicator-Android-Light.png|thumbnail! !ActivityIndicator-Android-Dark.png|thumbnail! *Progress Bar Test:* This can be tested with the attached [^ProgressBarTest.js], which will display what's shown below. !ProgressBar-Android-Light.png|thumbnail! !ProgressBar-Android-Dark.png|thumbnail! *Breaking-Change:* The app must use a "Theme.MaterialComponents" based theme or else an exception will occur. So, app's using a custom theme based from "Theme.AppCompat" or similar will crash. This is normal and the exception will state that the theme will need to change.

Attachments

FileDateSize
ActivityIndicator-Android-Dark.png2021-02-24T02:38:49.000+0000416722
ActivityIndicator-Android-Light.png2021-02-24T02:38:47.000+0000418830
ActivityIndicatorTest.js2021-02-24T02:33:55.000+0000763
ProgressBar-Android-Dark.png2021-02-24T03:42:58.000+0000412150
ProgressBar-Android-Light.png2021-02-24T03:42:59.000+0000413526
ProgressBarTest.js2021-02-24T03:41:17.000+0000787

Comments

  1. Joshua Quick 2021-02-12

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12353
  2. Satyam Sekhri 2021-03-02

    FR Passed
  3. Christopher Williams 2021-03-05

    merged to master and 10_0_X for 10.0.0 release target.

JSON Source