判断webview加载完毕
2013-08-27 21:22
369 查看
package
com.jouhu;
import
android.app.Activity;
import
android.app.ProgressDialog;
import
android.os.Bundle;
import
android.webkit.WebView;
import
android.webkit.WebViewClient;
public
class
WebViewFinishedActivity
extends
Activity {
/** Called when the activity is first created. */
WebView wv =
null
;
ProgressDialog pd =
null
;
@Override
public
void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
setContentView(R.layout.main);
wv = (WebView)findViewById(R.id.webView1);
if
(wv !=
null
)
{
wv.setWebViewClient(
new
WebViewClient()
{
@Override
public
void
onPageFinished(WebView view,String url)
{
pd.dismiss();
}
});
loadUrl(
"http://www.sohu.com"
);
}
}
public
void
loadUrl(String url)
{
if
(wv !=
null
)
{
wv.loadUrl(url);
pd = ProgressDialog.show(
this
,
"导购系统"
,
"系统加载中..."
);
wv.reload();
}
}
}
相关文章推荐
- 如何准确判断 WebView 加载完成
- 解决webview多次加载,无法准确判断页面加载完成的问题
- Android中如何判别WebView加载完毕并使用ProgressDialog进行提示
- android webView判断是否加载完成
- Android中如何判别WebView加载完毕并使用ProgressDialog进行提示
- Android中如何判别WebView加载完毕并使用ProgressDialog进行提示
- android webView判断是否加载完成的2种办法
- android webView判断是否加载完成的2种办法
- WebView打开网页,设置支持Javascript,浏览的网页后退而不是退出浏览器,判断页面加载过程,缓存的使用
- 判断webview是否彻底加载完成
- 关于WKWebView加载完毕的代理方法
- iOS 基于JavaScriptCore 不等webView加载完毕就交互,网页获取原生内容。 webView的高级用法之JS交互,js与oc的相互调用
- php判断网页 是否是 Android webview加载
- php判断网页 是否是 Android webview加载
- Webview--如何让加载进来的页面自适应手机屏幕分辨率
- ios开发加载webview显示进度条实例
- WKWebView 加载本地JS、htlm文件
- android WebView, WebChromeClient和WebViewClient加载网页基本用法
- 视图加载完毕,让textView弹出键盘
- android 的webView加载h5,和h5的交互(java和JavaScript的交互)