我正在尝试在我的webview应用程序中实现一个加载对话框,但无论我做什么它都行不通....这是我的代码
公共类AlTibbiWebViewActivity扩展了Activity {
private WebView wv;
private Intent incomingIntent = null;
private WebViewClient wvc = new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
wv.loadUrl(url);
return true;
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.web_view);
this.wv = (WebView) findViewById(R.id.webView);
this.wv.setWebViewClient(wvc);
wv.getSettings().setJavaScriptEnabled(true);
this.incomingIntent = getIntent();
String urlToLoad = incomingIntent.getExtras().getString("urlToLoad");
wv.loadUrl(urlToLoad);
}