我正在尝试在我的应用程序中将加载程序对话框添加到我的 web 视图中。那么,你能帮我解决这个问题吗?
这是我的 webview代码:
public class AlTibbiWebViewActivity extends 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");
//EXTRA HEADER MAP (remove header from web view )
Map<String, String> aMap = new HashMap<String, String>() ;
aMap.put("app", "no");
//myMap = Collections.unmodifiableMap(aMap);
wv.loadUrl(urlToLoad , aMap);
}