加载 youtube 视频时 webView.stopLoading 不起作用。
public void onCreate(Bundle b)
{
WebView webView=(WebView) findViewById(R.id.sssWebView);
webview.setWebViewClient(new WebViewClient());
WebSettings webSettings = webReview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(false);
webSettings.setPluginState(PluginState.ON);
webSettings.setSupportMultipleWindows(false);
webSettings.setSupportZoom(false);
webview.setVerticalScrollBarEnabled(false);
webview.setHorizontalScrollBarEnabled(false);
webview.loadUrl("http://www.youtube.com/v/" + videoID);
}
@Override
public void onBackPressed()
{
if(progreesDialogue!=null && progreesDialogue.isShowing())
{
progreesDialogue.dismiss();
}
webview.clearView();
webview.stopLoading();
this.finish();
super.onBackPressed();
}