Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27308] Android: Determinant "ProgressIndicator" ignores "value" property before shown

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2019-08-23T04:58:52.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.1.1
ComponentsAndroid
LabelsProgressIndicator, android, dialog, engSchedule
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-08-06T04:21:53.000+0000
Updated2019-08-23T04:58:52.000+0000

Description

*Summary:* The Ti.UI.Android.ProgressIndicator set up as "type" PROGRESS_INDICATOR_DETERMINANT ignores the "value" property when the show() method is called. The displayed progress is initialize to zero. Setting the "value" property only works after progress indicator is shown. *Steps to reproduce:*

Build and run the below code on Android.

Tap on the "Show Progress Dialog" button.

Observe the dialog's progress bar position.

var progressIndicator = Ti.UI.Android.createProgressIndicator({
	message: "Progressing...",
	location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,
	type: Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT,
	cancelable: true,
	min: 0,
	max: 100,
	value: 50,  // <- This is ignored.
});
var window = Ti.UI.createWindow();
var showButton = Ti.UI.createButton({
	title: "Show Progress Dialog",
	bottom: "30dp",
});
showButton.addEventListener("click", function() {
	progressIndicator.show();
});
window.add(showButton);
window.open();
*Result:* The dialog's progress bar is at 0%, which is wrong. *Expected Result:* The dialog's progress bar should be 50%. *Work-Around:* Set the progress value after the show() method is called.
progressIndicator.show();
progressIndicator.value = 50;

Comments

  1. Joshua Quick 2019-08-13

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11115 PR (8.1.x): https://github.com/appcelerator/titanium_mobile/pull/11142 PR (8.3.x): https://github.com/appcelerator/titanium_mobile/pull/11143
  2. Satyam Sekhri 2019-08-20

    FR Passed on master, 8_1_X and 8_3_X. The progress indicator works as expected. Waiting for builds to pass.
  3. Keerthi Mahalingam 2019-08-23

    Verified the fix on sdk 8.3.0.v20190822115908,8.2.0.v20190822114913 and 8.1.1.v20190822103134.Progress indicator works as expected. Closing Test Enviornment: Operating System Name = Mac OS X Version = 10.14.5 Architecture = 64bit Memory = 17179869184 Node.js Node.js Version = 10.16.2 npm Version = 6.9.0 Titanium CLI CLI Version = 5.2.1 Titanium SDK SDK Version = 8.2.0.v20190822114913 Device = One plus 5T android 9,samsung s5 android 6 Emulator= pixel android 9,nexus android 8

JSON Source