代码段:
WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_FULLSCREEN,
PixelFormat.TRANSLUCENT);
windowManager.addView(webView, params);
工作正常:浏览器显示,链接点击工作,但网页滚动不起作用。
可能是什么原因?
感谢。
答案 0 :(得分:0)
以下缩放控制属性应该有效。
WebSettings l_webviewSetting = webview.getSettings();
l_webviewSetting.setAllowFileAccess(true);
l_webviewSetting.setAppCacheEnabled(true);
l_webviewSetting.setBlockNetworkImage(false);
l_webviewSetting.setBlockNetworkLoads(false);
l_webviewSetting.setBuiltInZoomControls(true);
l_webviewSetting.setLoadsImagesAutomatically(true);
l_webviewSetting.setJavaScriptCanOpenWindowsAutomatically(true);
l_webviewSetting.setJavaScriptEnabled(true);
l_webviewSetting.setUseWideViewPort(true);
l_webviewSetting.setLoadWithOverviewMode(true);
l_webviewSetting.setDomStorageEnabled(true);
l_webviewSetting.getBuiltInZoomControls();