[TIMOB-12206] Android: ProgressIndicator in status bar is hidden by heavyweight windows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-11T08:03:33.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.2 |
Components | Android |
Labels | n/a |
Reporter | Benjamin Hatfield |
Assignee | jithinpv |
Created | 2013-01-04T10:39:09.000+0000 |
Updated | 2017-03-21T21:39:26.000+0000 |
Description
ISSUE:
Setting the Ti.UI.Android.ProgressIndicator with the location in the status bar works fine on lightweight windows but not on heavyweight windows. The heavyweight window appears to hide the progress bar.
REPRODUCTION:
Run the code below on the Android emulator with the modal property for win2 commented out and uncommented (line 10).
RESULTS:
When set as a lightweight window, the progress bar appears as expected.
When set as a heavyweight window, the progress bar is hidden by the heavyweight window. You can see a full progress bar briefly as the window closes. Might want to comment out line 34 when you hide the progress indicator to see it better.
ADDITIONAL INFO:
Works fine with both heavyweight and lightweight windows with the location set as the dialog box.
WORKAROUND:
If you create the progress indicator inside the event listener, it is displayed on the heavyweight window.
Ti.UI.backgroundColor = 'white';
var win1 = Ti.UI.createWindow({
backgroundColor: 'blue',
exitOnClose: true
});
var win2 = Ti.UI.createWindow({
backgroundColor: 'yellow',
//modal: false
});
var progressIndicator = Ti.UI.Android.createProgressIndicator({
message: 'Loading...',
location: Titanium.UI.Android.PROGRESS_INDICATOR_STATUS_BAR,
type: Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT,
cancelable: true,
min: 0,
max: 10
});
win2.addEventListener('open', function (e) {
progressIndicator.show();
var value = 0;
setInterval(function(){
if (value > 10) {
return;
}
progressIndicator.value = value;
value ++;
}, 200);
setTimeout(function(){
e.source.close();
progressIndicator.hide();
}, 3000);
});
win1.open();
win2.open();
Issue does not reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4
Closing ticket as the issue cannot be reproduced and due to the above comments.