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

Android: Hiding/Showing progress indicator back-to-back puts it in a bad state as of 8.1.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 8.1.1
    • Fix Version/s: Release 9.0.3
    • Component/s: Android
    • Environment:
    • Story Points:
      3
    • Sprint:
      2020 Sprint 3, 2020 Sprint 9

      Description

      Summary:
      Hiding and showing a progress indicator dialog like the below prevents the dialog from being hidden ever again.

      // Hide/show dialog back-to-back.
      progressIndicator.hide();
      progressIndicator.show();
       
      // Uh-oh. Can never hide dialog ever again now.
      

      Steps to reproduce:

      1. Build and run the below code on Android.
      2. Tap on the button.
      3. Notice the progress dialog never closes. (Supposed to close in 5 seconds.)

      var self = Ti.UI.createWindow({
      		backgroundColor:'#ffffff',
      		navBarHidden:true,
      		exitOnClose:true
      	});
      	
      	var button = Ti.UI.createButton({
      	  title: 'Show Progress Dialog'
      	});
      	
      	var progressIndicator = Ti.UI.Android.createProgressIndicator({
      	  message: 'Loading...',
      	  location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,
      	  cancelable: true,
      	});
      	
      	button.addEventListener('click', function (e) {
      	  progressIndicator.show();
      	  
      	  setTimeout(function(){
      	    progressIndicator.hide();
      	    progressIndicator.show();
      	  }, 3000);
      	  
      	  setTimeout(function(){
      	    progressIndicator.hide();
      	  }, 5000);
      	});
      	
      	self.add(button);
      	self.open();
      

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              Claudiu Stefaniga cstefaniga
              Reviewer:
              Gary Mathews
              Tester:
              Satyam Sekhri
            • Watchers:
              7 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