1

我有两个问题:

  • 我发现这段代码可以在 中使用捏,webImageView但是当我更改webImageViewWebView. 我在代码中得到一个错误。我怎么用捏webview??

     // 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);
    
  • 当我在我的代码中添加捏是所有移动 android 都支持的,或者你应该有一个特定的屏幕来让它工作。

4

2 回答 2

2

您可以通过以下 WebView 设置启用放大 WebView

mWebView.getSettings().setBuiltInZoomControls(true);

您还可以使用 ZoomDensity 设置默认缩放级别

mWebView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.CLOSE);
于 2011-11-06T20:14:42.340 回答
1

Nikko的引用库添加了吗? http://code.google.com/p/android-pinch/wiki/PinchImageView

于 2011-10-06T13:16:00.613 回答