Reputation: 1273
I have WebViews imbedded in 3 different tabs and I want to show the progress dialog until the webview in that tab is loaded. I have gotten it to show, but not dismiss. I am trying to do it in the onTabChanged method. Here is my code:
mTabHost.setOnTabChangedListener(new OnTabChangeListener(){
public void onTabChanged(String tabId) {
if("TAB_1".equals(tabId)) {
webview2.reload();
webview3.reload();
}
if("TAB_2".equals(tabId)) {
webview3.reload();
}
if("TAB_3".equals(tabId)) {
webview2.reload();
}
}});
Upvotes: 1
Views: 1330
Reputation: 73484
Specify a WebViewClient and override onPageFinished() to dismiss the progress dialog.
Upvotes: 2