您的位置:首页 > 移动开发

webVIew中ZoomButtonsController崩溃//解决Receiver not registered: android.widget.ZoomButtonsController

2016-01-11 17:34 483 查看
/*网上主流的那些设置webview为空之类的方式,只是在部分机型可以解决。
最简单的解决方式就是给按钮给足够的时间,即使是界面已经销毁了。
也就是延迟销毁webview*/
if(webview != null) {
webview.getSettings().setBuiltInZoomControls(true);
mWebView.setVisibility(View.GONE);
long timeout = ViewConfiguration.getZoomControlsTimeout();//timeout ==3000
Log.i("time==",timeout);
new Timer().schedule(new TimerTask() {
@Override
public void run() {
// TODO Auto-generated method stub
mWebView.destroy();
}
}, timeout);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: