Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28485] Android: ProgressBar "tintColor" and "trackTintColor" are ignored as of 10.0.0

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2021-06-15T09:29:13.000+0000
Affected Version/sRelease 10.0.0
Fix Version/sRelease 10.0.1
ComponentsAndroid
Labelsandroid, progressbar, regression, tintColor
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-06-10T00:11:35.000+0000
Updated2021-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

FileDateSize
ProgressBarTintBad.png2021-06-10T01:08:40.000+0000404923
ProgressBarTintGood.png2021-06-10T01:08:40.000+0000404825

Comments

  1. Joshua Quick 2021-06-10

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12878
  2. Christopher Williams 2021-06-14

    Merged to master
  3. Ewan Harris 2021-06-15

    10_0_X PR merged

JSON Source