[TIMOB-27573] Android: Hiding/Showing progress indicator back-to-back puts it in a bad state as of 8.1.1
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-06-08T13:56:24.000+0000 |
Affected Version/s | Release 8.1.1 |
Fix Version/s | Release 9.0.3 |
Components | Android |
Labels | android, dialog, engSchedule, hide, progressindicator, regression, show |
Reporter | cstefaniga |
Assignee | Joshua Quick |
Created | 2019-11-11T07:07:13.000+0000 |
Updated | 2020-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();
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.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/11684
FR Passed.
PR (9.0.x): https://github.com/appcelerator/titanium_mobile/pull/11746
merged to 9_0_X for 9.0.3 target
Verified changes in 9.0.3.v20200608051820 and 9.1.0.v20200604104832. Closing ticket.