[TIMOB-28485] Android: ProgressBar "tintColor" and "trackTintColor" are ignored as of 10.0.0
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-06-15T09:29:13.000+0000 |
| Affected Version/s | Release 10.0.0 |
| Fix Version/s | Release 10.0.1 |
| Components | Android |
| Labels | android, progressbar, regression, tintColor |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2021-06-10T00:11:35.000+0000 |
| Updated | 2021-06-15T09:29:13.000+0000 |
Description
*Summary:*
As of Titanium 10.0.0, Android's
Ti.UI.ProgressBar properties "tintColor" and "trackTintColor" are ignored. These color can only be assigned via a theme.
*Steps to reproduce:*
Build and run the below code on Android.
Observe the progress bar colors.
let timerId = null;
const window = Ti.UI.createWindow();
const progressBar = Ti.UI.createProgressBar({
tintColor: "green", // Ignored as of 10.0.0
trackTintColor: "red", // Ignored as of 10.0.0
animated: false,
min: 0,
max: 100,
value: 0,
width: "80%",
});
window.add(progressBar);
window.addEventListener("open", () => {
timerId = setInterval(() => {
const value = progressBar.value + 1;
progressBar.value = (value <= 100) ? value : 0;
progressBar.message = Progress at ${progressBar.value}%;
}, 50);
});
window.addEventListener("close", () => {
if (timerId) {
clearInterval(timerId);
timerId = null;
}
});
window.open();
*Result:*
Notice the "tintColor" and "trackTintColor" above are ignored, where the progress bar should be green with a red background.
!ProgressBarTintBad.png|thumbnail!
*Expected Result:*
!ProgressBarTintGood.png|thumbnail!
Attachments
| File | Date | Size |
|---|---|---|
| ProgressBarTintBad.png | 2021-06-10T01:08:40.000+0000 | 404923 |
| ProgressBarTintGood.png | 2021-06-10T01:08:40.000+0000 | 404825 |
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12878
Merged to master
10_0_X PR merged