android webview background,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.

Thx

回答1:

I hade the same problem a while ago, I know what you want. Asynctask! here is a good link I read on to get it to work!

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?

GL mate

回答2:

You can set the webview's visibility to GONE and load the page and when onPageFinished is fired, you can then show the webview.

Hope this helps.

回答3:

you can use asynctaskLoader take a look it's better than the asynctask because it can manage the orientation changed and some other cool things...

来源:https://stackoverflow.com/questions/7944546/android-webview-load-in-background

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值