Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

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

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-06-08T13:56:24.000+0000
Affected Version/sRelease 8.1.1
Fix Version/sRelease 9.0.3
ComponentsAndroid
Labelsandroid, dialog, engSchedule, hide, progressindicator, regression, show
Reportercstefaniga
AssigneeJoshua Quick
Created2019-11-11T07:07:13.000+0000
Updated2020-06-08T13:56:24.000+0000

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:*

Build and run the below code on Android.

Tap on the button.

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();

Comments

  1. Sharif AbuDarda 2019-11-12

    Hello, This is a valid issue, I have tested in SDK 8.2.1.GA with Android emulators. Looks the progress indicator is not hiding the second time. Moving to TIMOB. Thanks.
  2. Joshua Quick 2020-05-05

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11684
  3. Satyam Sekhri 2020-05-12

    FR Passed.
  4. Joshua Quick 2020-06-02

    PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11746
  5. Christopher Williams 2020-06-05

    merged to 9_0_X for 9.0.3 target
  6. Ewan Harris 2020-06-08

    Verified changes in 9.0.3.v20200608051820 and 9.1.0.v20200604104832. Closing ticket.

JSON Source