简体   繁体   English

Android webView在后台加载

[英]Android webView Load in Background

I have an app which i want to open a webview right now i am loading the webview the most simple way i would like to load the webpage in the background so the user will not have a waiting time maybe in a service running in the background or in a prevoius activity i looked around the forums and could not find a refrence to the subject help will be appriciated. 我有一个应用程序,我想立即打开webview我正在加载webview最简单的方式我想在后台加载网页,这样用户可能没有等待时间可能在后台运行的服务或在一个prevoius活动中,我环顾四周的论坛,无法找到对主题帮助的反馈意见。 Thx 谢谢

You can set the webview's visibility to GONE and load the page and when onPageFinished is fired, you can then show the webview. 您可以将webview的可见性设置为GONE并加载页面,当触发onPageFinished时,您可以显示webview。

Hope this helps. 希望这可以帮助。

I hade the same problem a while ago, I know what you want. 我刚才也有同样的问题,我知道你想要什么。 Asynctask! 的AsyncTask! here is a good link I read on to get it to work! 这是我读到的一个很好的链接,让它工作!

http://www.brighthub.com/mobile/google-android/articles/82805.aspx http://www.brighthub.com/mobile/google-android/articles/82805.aspx

How you get it to work properly. 如何让它正常工作。 Load your webview in the doInBackground and perhaps a ProgressDialog that shows that your app i working? 将您的webview加载到doInBackground中,也许还有一个ProgressDialog,它显示您的应用程序正在运行?

GL mate GL队友

你可以使用asynctaskLoader 来看看它比asynctask更好,因为它可以管理改变的方向和其他一些很酷的东西......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM