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.
问问题
1888 次
2 回答
1
你可以使用PhotoView 它有更多的选择
于 2013-10-10T18:26:33.243 回答
1
但我喜欢使用内置缩放控件的 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 回答