在webview android中使用pinch
我有两个问题:在webview android中使用pinch,android,webview,pinch,Android,Webview,Pinch,我有两个问题: 我发现这段代码在webImageView中使用了pinch,但是当我通过WebView更改webImageView时。我在代码中得到一个错误。如何在webview中使用pinch // create the WebImageView object from xml WebImageView img = (WebImageView) findViewById(R.id.main_pic); // fetches the image in a background thread
- 我发现这段代码在
中使用了pinch,但是当我通过webImageView
更改WebView
时。我在代码中得到一个错误。如何在webImageView
中使用pinchwebview
// create the WebImageView object from xml WebImageView img = (WebImageView) findViewById(R.id.main_pic); // fetches the image in a background thread img.setImageFromURL("http://www.mysite.com/mypicture.jpg"); // enable pinch-zoom abilities on the image new PinchImageView(img);
- 当我在我的代码中添加pinch时,所有的移动android都支持它,或者你应该有一个特定的屏幕来让它工作
您可以按照WebView设置在WebView中启用缩放
mWebView.getSettings().setBuiltInZoomControls(true);
还可以使用ZoomDensity设置默认缩放级别
mWebView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.CLOSE);
“我在代码中获得了一个错误。”。。。怎么会有人知道那里发生了什么?请显示代码和错误日志。错误不是在我运行代码时发生的。当我写图像时,新的PinchImageView(webview);我应该改变网络视图。