Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27308

Android: Determinant "ProgressIndicator" ignores "value" property before shown

    Details

    • Story Points:
      5
    • Sprint:
      2019 Sprint 17

      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:

      1. Build and run the below code on Android.
      2. Tap on the "Show Progress Dialog" button.
      3. 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;
      

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Gary Mathews
              Tester:
              Satyam Sekhri
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration