View=android.widget.ZoomButtonsController$Container not attached to window manager
来源:互联网 发布:linux 安装gzip 编辑:程序博客网 时间:2024/06/05 05:04
bug 信息如图:
搜索 ZoomButtonsController 之后几乎所有的问题都指向: WebView
看下 WebActivity,这个版本为了兼容合作公司的网页,加了一堆配置
webview.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); webview.getSettings().setBuiltInZoomControls(true); webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); webview.getSettings().setAllowFileAccess(true); webview.getSettings().setSupportZoom(true); webview.getSettings().setUseWideViewPort(true); webview.getSettings().setSupportMultipleWindows(true); webview.getSettings().setAppCacheEnabled(true); webview.getSettings().setDomStorageEnabled(true); webview.getSettings().setGeolocationEnabled(true); webview.getSettings().setAppCacheMaxSize(Long.MAX_VALUE); webview.getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND); webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
问题应该就出在这里,按照这篇文章中的说法:
webview ZoomButtonsController 调用崩溃问题android.widget.ZoomButtonsController,在调用 webView.destroy() 之前,应该先调用: webview.setVisibility(View.GONE) ,不过之后在这篇文章中又提到部分手机不兼容的问题,那么,事实上原生 WebView 的 ZoomButton 巨丑,商量之后,果断禁用掉,还省去了一堆麻烦事:
webview.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); webview.getSettings().setAllowFileAccess(true); webview.getSettings().setUseWideViewPort(true); webview.getSettings().setSupportMultipleWindows(true); webview.getSettings().setAppCacheEnabled(true); webview.getSettings().setDomStorageEnabled(true); webview.getSettings().setGeolocationEnabled(true); webview.getSettings().setAppCacheMaxSize(Long.MAX_VALUE); webview.getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND); webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); webview.getSettings().setBuiltInZoomControls(false); webview.getSettings().setSupportZoom(flase);
阅读全文
0 0
- View=android.widget.ZoomButtonsController$Container not attached to window manager
- android View not attached to window manager
- Android Exception: View not attached to window manager
- Android View not attached to window manager解决方案
- view not attached to window manager
- View not attached to window manager
- illegalargumentexception: view not attached to window manager
- View not attached to window manager
- View not attached to window manager解决方案
- View not attached to window manager
- View not attached to window manager解决方案
- View not attached to window manager解决方案
- View not attached to window manager解决方案
- View not attached to window manager解决方案
- View not attached to window manager解决方案
- View not attached to window manager解决方案
- View not attached to window manager
- View not attached to window manager
- Android 高通4.4.4 源码 如何屏蔽Home键
- 生成回文数 --第六届蓝桥杯国赛JAVA C组
- thinkphp导入第三方金山云sdk
- DNS本地解析
- HDU 4417 Super Mario(线段树||树状数组+离线操作 之线段树篇)
- View=android.widget.ZoomButtonsController$Container not attached to window manager
- 项目构建工具Gradle详解
- bat文件和sh文件
- xpath的使用方法以及python爬取数据的保存
- java基础复习--复习总结7
- Qt翻译文件结合VS实现语言切换(多语言国际化)
- Permission denied: user=root, access=WRITE,inode=
- Bundle adjustment-光束法平差介绍
- Android平台一个杀掉由关键字查找到的进程bat脚本