[TIMOB-10883] iOS: Activity indicator does not work when created on firing an event
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-09-12T15:36:41.000+0000 |
Affected Version/s | Release 2.1.2 |
Fix Version/s | n/a |
Components | n/a |
Labels | parity |
Reporter | Amuktha Akkinepally |
Assignee | Neeraj Gupta |
Created | 2012-09-12T15:01:55.000+0000 |
Updated | 2017-03-09T23:39:49.000+0000 |
Description
Activity Indicator does not show up when it is fired. This works fine on Android.
Steps to Reproduce:
1.Load the app.js 2.Run the app on iPhone Simulator 3.Click on the 'click me' button Expected Behavior: The Activity Indicator Should be spinning before the Optional Dialogue Appears. Actual Behavior: Nothing is seen for like 6 sec and then the Optional Dialogue is seen.
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var button = Ti.UI.createButton({
title: 'click me',
width: 200,
left: 10,
top: 10
});
var activityIndicator2 = Ti.UI.createActivityIndicator({
color: 'green',
font: {fontFamily:'Helvetica Neue', fontSize:26, fontWeight:'bold'},
message: 'Loading...',
style:Ti.UI.iPhone.ActivityIndicatorStyle.DARK,
top:10,
left:10,
height:'auto',
width:'auto'
});
button.addEventListener('click', function(e) {
activityIndicator2.show();
setTimeout(function() {
activityIndicator2.hide();
var json = [{"Group":"PowerUser","Guid":"287d91c4-f036-49a2-bab9-dca2dd13c417","Id":1,"Name":"AMIP"},{"Group":"PowerUser","Guid":"92cd37bc-bf2e-4c13-af5e-c494bab262d8","Id":17,"Name":"Android"},{"Group":"PowerUser","Guid":"aecf38e4-a63c-4a45-b992-f21de048738a","Id":69,"Name":"Anglian Water"},{"Group":"PowerUser","Guid":"d6032d39-a6bf-42a0-975c-8d4bb52d6373","Id":1,"Name":"Assura"},{"Group":"PowerUser","Guid":"e5d229b5-7667-4a11-b593-3148fd920d0c","Id":1,"Name":"Babcock Brown"},{"Group":"PowerUser","Guid":"6c62f9e4-a28e-4b67-8d49-724ae4c32596","Id":1,"Name":"Barnsley MBC"},{"Group":"PowerUser","Guid":"6ed980b0-af95-44ad-a539-72926d6e83df","Id":1,"Name":"BFK JV"},{"Group":"PowerUser","Guid":"86e40c5e-34ac-4898-be3e-ee7c7bdaa01c","Id":1,"Name":"BOL Derbyshire CC"},{"Group":"PowerUser","Guid":"5560448e-cf29-455f-9c17-1ebe9470f6a6","Id":1,"Name":"BOLManchester"},{"Group":"PowerUser","Guid":"9475b7f7-a1ea-4b38-bf63-be5a7836ad99","Id":1,"Name":"BridgeZone"},{"Group":"PowerUser","Guid":"d96ade2b-2606-4f1c-b2de-cc90989a7711","Id":1,"Name":"BSF - LEP demo"},{"Group":"PowerUser","Guid":"c9ada471-a107-4388-847b-bcc5da90c025","Id":1,"Name":"BSF - Somerset LEP"},{"Group":"PowerUser","Guid":"809ae2c1-de5a-4b11-b875-184be081c35f","Id":1,"Name":"Burges Salmon"},{"Group":"PowerUser","Guid":"e4a1b848-9455-469a-ad47-f202fb3ad6ca","Id":1,"Name":"CBC"},{"Group":"PowerUser","Guid":"43c62431-2db7-4e84-8d4c-ee13483b443e","Id":1,"Name":"Community Ventures (Leeds) Ltd"},{"Group":"Standard User","Guid":"8c604fea-ccda-4d97-bbbe-3895ca3b0051","Id":12,"Name":"Connector"},{"Group":"PowerUser","Guid":"454eede3-7a6a-4172-96f7-238e5250acd9","Id":1,"Name":"Constructing Wales"},{"Group":"PowerUser","Guid":"be637d08-f27d-44f2-89e8-374b54d6b0ac","Id":1,"Name":"Consult Your Staff"},{"Group":"PowerUser","Guid":"80af5d84-9c9d-475d-804f-c1ee32abb93d","Id":1,"Name":"Coprop"},{"Group":"Master","Guid":"0f6050f8-79c9-4ae6-badf-a8f023a22b8a","Id":1,"Name":"Corporate Social Responsibility"},{"Group":"PowerUser","Guid":"4a3c8a9b-1c7b-4994-b80f-b9ef5eabfd17","Id":1,"Name":"CultureDB"},{"Group":"PowerUser","Guid":"afa237fd-7f08-4e38-a142-868b594c1181","Id":1,"Name":"DCC & SWH"},{"Group":"PowerUser","Guid":"09f5edbc-8241-498c-9961-fdb3dfb2aa7d","Id":69,"Name":"Demonstration Database"},{"Group":"PowerUser","Guid":"b03964dc-7988-4236-a3d1-fb941398c370","Id":1,"Name":"Dudley"},{"Group":"PowerUser","Guid":"4e99ea00-1de1-494b-a920-6af61c9f9eda","Id":1,"Name":"Dundee City Council"},{"Group":"PowerUser","Guid":"04cea4b5-4733-43df-b3e7-a6ebc04ab238","Id":1,"Name":"Durham"},{"Group":"PowerUser","Guid":"e279f5cc-9535-42f6-845b-1d6d4f25799e","Id":1,"Name":"Eric Wright Group"},{"Group":"PowerUser","Guid":"2f0e6713-de5e-47b3-ae70-0618067f7f91","Id":1,"Name":"ESB"},{"Group":"PowerUser","Guid":"7c476ff2-e1be-46fb-a971-b90849dd2140","Id":1,"Name":"Frameworks Scotland"},{"Group":"PowerUser","Guid":"fd9ed2f6-231c-413c-9752-8a2d77116b2a","Id":1,"Name":"GRAHAM"},{"Group":"PowerUser","Guid":"eab188ee-641e-4832-9343-0dbda8e76dfb","Id":1,"Name":"Hackney Homes"},{"Group":"PowerUser","Guid":"65042e24-2685-4aa1-a651-bea74d94d146","Id":1,"Name":"Hampshire"},{"Group":"PowerUser","Guid":"3daa2212-fbb3-42a1-baf7-6172ed5a66a3","Id":1,"Name":"HAPIMS"},{"Group":"PowerUser","Guid":"27e1dc36-73e0-47eb-a096-bd16fb495ec3","Id":1,"Name":"Highway Works"},{"Group":"PowerUser","Guid":"42123ad3-eaea-4efc-a521-8b6d398a1b5a","Id":1,"Name":"Highways Design"},{"Group":"PowerUser","Guid":"ae3dc3eb-69c1-46ab-a975-259ca82b6e07","Id":1,"Name":"Hire Association Europe"},{"Group":"PowerUser","Guid":"abb0057f-458f-43c8-9966-06cab99cbf57","Id":7,"Name":"HWR Survey"},{"Group":"Reporting User","Guid":"abb0057f-458f-43c8-9966-06cab99cbf57","Id":30,"Name":"HWR Survey"},{"Group":"PowerUser","Guid":"93af82f1-e10f-4dfa-9bb1-e3e5a2b95333","Id":69,"Name":"IESE Construction & Asset Management"},{"Group":"PowerUser","Guid":"aabcd0f1-f549-4e35-8ef4-4547f9c76e1a","Id":1,"Name":"IESE PSF"},{"Group":"PowerUser","Guid":"2807e81a-bcfc-4c75-9a08-5690519713c8","Id":69,"Name":"Issue Analyst Database "},{"Group":"PowerUser","Guid":"59cbf3a5-f828-4a68-883f-b5c280f4fe10","Id":1,"Name":"Keepmoat"},{"Group":"PowerUser","Guid":"cc42ec7c-cbb8-42a7-b944-046bdea7a5f6","Id":1,"Name":"Kier Construction"},{"Group":"PowerUser","Guid":"51e837a6-a9be-462e-a139-1dc20a4795e7","Id":1,"Name":"Kier Health & Safety"},{"Group":"PowerUser","Guid":"78d9efb7-e5bd-4b88-93db-4135668fe277","Id":73,"Name":"Law League"},{"Group":"Master","Guid":"f8aabaaa-c194-4c52-95a5-f832ffbe18dc","Id":1,"Name":"M2i Housing Inspector"},{"Group":"PowerUser","Guid":"6ddc3a6a-17ec-4843-9c7b-9817728bf09c","Id":1,"Name":"Master Templates"},{"Group":"PowerUser","Guid":"d253112b-3f3b-4165-b19a-c550c38ea9b2","Id":70,"Name":"Morrison Facilities Services"},{"Group":"Survey User","Guid":"d253112b-3f3b-4165-b19a-c550c38ea9b2","Id":73,"Name":"Morrison Facilities Services"},{"Group":"Wolseley","Guid":"d253112b-3f3b-4165-b19a-c550c38ea9b2","Id":199,"Name":"Morrison Facilities Services"},{"Group":"SetupUser","Guid":"00146bdc-bb4c-4e78-bd43-885c54775e33","Id":1,"Name":"MSIG"},{"Group":"PowerUser","Guid":"7b5a92f1-f180-4e8f-990a-ce64e5fa1f7c","Id":7,"Name":"National Highways"},{"Group":"Reporting User","Guid":"7b5a92f1-f180-4e8f-990a-ce64e5fa1f7c","Id":30,"Name":"National Highways"},{"Group":"PowerUser","Guid":"66e091bd-c99e-4348-b60e-f939a74ed121","Id":1,"Name":"NHT Benchmarking"},{"Group":"SetupUser","Guid":"65d6e214-4932-41eb-85b4-13113e9a6879","Id":1,"Name":"NHT NEPIN"},{"Group":"PowerUser","Guid":"12974ba5-279e-400d-9f6a-7856757230f1","Id":7,"Name":"NHT Public Representative"},{"Group":"Reporting User","Guid":"12974ba5-279e-400d-9f6a-7856757230f1","Id":30,"Name":"NHT Public Representative"},{"Group":"Reporting User","Guid":"12974ba5-279e-400d-9f6a-7856757230f1","Id":1,"Name":"NHT Public Representative"},{"Group":"PowerUser","Guid":"c8cd2fa0-4eb3-43dd-8adf-e0f0729e8ccd","Id":7,"Name":"NHTCQC2011"},{"Group":"Unitary - Rural","Guid":"c8cd2fa0-4eb3-43dd-8adf-e0f0729e8ccd","Id":210,"Name":"NHTCQC2011"},{"Group":"PowerUser","Guid":"1bac3e60-c707-44a8-b45b-2837c121aa6f","Id":1,"Name":"NIWS"},{"Group":"PowerUser","Guid":"b50428e4-41db-4063-a3cd-5bba5ce241f4","Id":1,"Name":"North Yorkshire County Council"},{"Group":"PowerUser","Guid":"fdc2c165-3504-4736-a9d1-37b35ebc17f1","Id":2,"Name":"Northern Ireland Housing"},{"Group":"PowerUser","Guid":"d6977387-8205-4bed-9813-9f7d86f37b92","Id":1,"Name":"Post Occupancy Evaluation"},{"Group":"School Student","Guid":"d6977387-8205-4bed-9813-9f7d86f37b92","Id":10,"Name":"Post Occupancy Evaluation"},{"Group":"PowerUser","Guid":"3b378f3f-1d2d-448c-8a9f-fd5c4b5eddef","Id":1,"Name":"Primary Plus"},{"Group":"PowerUser","Guid":"7170d5f1-0ac3-4128-9d1b-905edaf1c017","Id":1,"Name":"Renova"},{"Group":"PowerUser","Guid":"052ecfac-ff07-49c7-8751-2c19872c8f42","Id":1,"Name":"Safety Online"},{"Group":"PowerUser","Guid":"fdab74c6-d8cd-433e-b455-8920a7aa3a52","Id":1,"Name":"Sales & Marketing Demonstration"},{"Group":"PowerUser","Guid":"057b45f4-dd7c-4d8e-905b-56962a04ef9c","Id":1,"Name":"SCC"},{"Group":"PowerUser","Guid":"63e43d7c-4ec0-4269-8c42-37adaf5d9102","Id":64,"Name":"SCMG"},{"Group":"PowerUser","Guid":"178084d4-dd44-44b9-b854-f0e60047a8c4","Id":1,"Name":"SE7 Highways Framework"},{"Group":"PowerUser","Guid":"741b15fe-e1e9-419a-8bf7-33f1051239fc","Id":69,"Name":"Skanska"},{"Group":"PowerUser","Guid":"7b5a92f1-f180-4e8f-990a-ce64e5fa1f7c","Id":7,"Name":"Somerset CC"},{"Group":"PowerUser","Guid":"f81172e0-9a3b-4f89-8180-6b872aa7cebb","Id":7,"Name":"South East Regional Group"},{"Group":"PowerUser","Guid":"f81172e0-9a3b-4f89-8180-6b872aa7cebb","Id":1,"Name":"South East Regional Group"},{"Group":"PowerUser","Guid":"ead940b5-d9c1-4a7e-a9fe-1370c4c239cc","Id":1,"Name":"South West Highways SIG"},{"Group":"PowerUser","Guid":"94e4247c-fe2f-4cd6-b5bb-a7036602737a","Id":1,"Name":"Troup Bywaters and Anders"},{"Group":"PowerUser","Guid":"22623683-fa08-404d-a172-fc6ecb6ee4ee","Id":1,"Name":"University Estates"},{"Group":"PowerUser","Guid":"aafc4ed4-7429-47c6-a703-515b1bc45047","Id":1,"Name":"Wakefield"},{"Group":"PowerUser","Guid":"74cca588-d072-413a-8990-48cf61c04640","Id":1,"Name":"Wiltshire"},{"Group":"PowerUser","Guid":"f81261ba-5ab3-4ac7-bd9b-8e882095166b","Id":69,"Name":"Wolseley"}];
var optionsArray = new Array;
for (loopCount = 0; loopCount < json.length; loopCount++) {
optionsArray[loopCount] = json[loopCount].Name;
}
var dialog = Ti.UI.createOptionDialog({
title: 'Select an authorisation',
options: optionsArray,
cancel: -1,
});
dialog.items = json;
dialog.addEventListener('click', function(args) {
dialog.hide();
alert('You selected an item');
});
// display authorisations available
dialog.show();
}, 3000);
})
win.add(activityIndicator2);
win.add(button);
win.open();
Activity Indicator and button are placed at the same position on the screen and the button is covering the indicator (since it is added later to the window). Either add button before activity indicator or set zIndex of activity indicator > zIndex of button
Closing ticket as invalid.