Reputation: 1693
My andriod project uses phonegap+jquerymobile. I want to add a loading dialog for login page with JQM api, the code:
function loginFunc() {
//show loading dialog
$.mobile.loading('show');
//here is an ajax method to get login result.
//hide loading dialog
$.mobile.loading('hide');
}
Sadly, in andriod virtual device the loading dialog does not work at all. However, i test the code in pc brower, loading dialog shows as expected.
How could this happen, any good suggestion? .
best regards, jack.
Upvotes: 0
Views: 923
Reputation: 1912
I did not really looked into your issue, and i know that it might not be an option for u guys. But please have a look at this really good blog post:
http://apachecordova.blogspot.de/2012/11/who-is-murdering-phonegap-its-jquery.html
JQuery Mobile really spams your complete DOM with auto generated stuff (e.g. Loading Spinner which should be present all the time...) and therefore slows your application down!
You can also have a look at this steps to speed up your phonegap application: http://floatlearning.com/2011/03/developing-better-phonegap-apps/
Please don't take it wrong, but if you want to develop well working phonegap applications, please do not use JQuery mobile. I know they are offering a lot of useful stuff, but you have too less power to control that giant framework to really optimize the performance of your app.
Good luck!
Upvotes: 1