0

I am new to android .I have created image view by programmatically.I want to add pinch zoom options to the image view. how to achieve it please help me.

4

2 回答 2

1

你可以使用PhotoView 它有更多的选择

于 2013-10-10T18:26:33.243 回答
1

Android imageView 放大和缩小

Android捏缩放ImageView

如何获得图像的缩放功能?

但我喜欢使用内置缩放控件的 WebView。

private WebView mWebView;
    mWebView = (WebView)findViewById(R.id.webview);
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setLoadWithOverviewMode(true);
    mWebView.getSettings().setUseWideViewPort(true);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
    mWebView.setScrollbarFadingEnabled(true);
    mWebView.loadDataWithBaseURL("file:///android_asset/", "<img src=\"banner5.png\" height=\"98%\" width=\"100%\"/>", "text/html", "utf-8", null);
于 2013-10-10T18:36:29.923 回答