我想在ImagePagerActivity中使用ImageViewZoom和Universal Image Loader.
我可以缩放图像,滑动到下一个图像.但是当图像处于变焦位置时,我正面临问题.

如果图像被缩放并且我处于中心位置,如果我想要看到同一图像的右侧部分并向左滑动它将转到下一个图像.请帮我这样做.
这是我的XML代码:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="1dip" >
<it.sephiroth.android.library.imagezoom.ImageViewTouch
android:layout_weight="1"
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitCenter" />
<ProgressBar
android:id="@+id/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)
编辑:
谢谢NOSTRA,现在我可以用下面的代码控制缩放和滑动.但多点触控变焦的问题.我无法用两根手指进行缩放.
这是我以前的代码(用两根手指正常工作):
public class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
@Override
public boolean onScale( ScaleGestureDetector detector ) {
Log.d( LOG_TAG, "onScale" );
float span = detector.getCurrentSpan() - detector.getPreviousSpan();
float targetScale = mCurrentScaleFactor * detector.getScaleFactor();
if ( mScaleEnabled ) {
targetScale = Math.min( getMaxZoom(), Math.max( targetScale, getMinZoom()-0.1f ) );
zoomTo( targetScale, detector.getFocusX(), detector.getFocusY() );
mCurrentScaleFactor …Run Code Online (Sandbox Code Playgroud)