admin管理员组文章数量:1287581
I am developing a phonegap android application which consists of three html pages.Each page have some dynamic data that loads on page initialization. I want to display a loader image on the click of a button to navigate to other html page while loading it.
How can i implement this? Is there any default function for this ?
I am developing a phonegap android application which consists of three html pages.Each page have some dynamic data that loads on page initialization. I want to display a loader image on the click of a button to navigate to other html page while loading it.
How can i implement this? Is there any default function for this ?
Share Improve this question edited Oct 3, 2013 at 12:25 Dom 2,5691 gold badge19 silver badges28 bronze badges asked Oct 3, 2013 at 11:39 UjjawalKrUjjawalKr 2411 gold badge4 silver badges20 bronze badges 2- Phonegap doesnt handle the navigation between pages. You need to use jQuery mobile or a similar framework. – Sam T Commented Oct 3, 2013 at 11:44
- i am using jquery mobile bt don't know the way to implement it.Any Help ? – UjjawalKr Commented Oct 3, 2013 at 11:47
3 Answers
Reset to default 6Documentation found here.
function showSpinner(){
$.mobile.loading("show");
}
function hideSpinner(){
$.mobile.loading("hide");
}
Above answer is also good there is another option manually you have to create one div on each HTML page like
<div id="pageLoader">
<div>
<img src="images/ajax-loader.gif" /> // give here path of any loader image you want
</div>
</div>
then call $("#pageLoader").show() and $("#pageLoader").hide() wherever you want to show and hide loading.
for android use
navigator.notification.activityStart
for detail check this
show-loading-screen-in-phonegap-app
本文标签:
版权声明:本文标题:javascript - To display loader image while loading the next page in phonegap android application - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741274827a2369668.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论