如何覆盖PhotoView的doubletap

时间:2015-01-14 13:15:09

标签: android double tap photoviewer

我想在doubletap之后设置scale = 4

onCreate()中的

         imageView = (ImageView)rootView.findViewById(R.id.imageView1);
         mAttacher = new PhotoViewAttacher(imageView);
         imageLoader.displayImage(globalWallImages.get(position).preview, imageView, options);
         mAttacher.setOnDoubleTapListener(this);

我正在设置mAttacher.setOnDoubleTapListener(this); 并在此接口的方法中执行:

public boolean onDoubleTap(MotionEvent e) {
        Log.e("","onDoubleTap");
        mAttacher.setScale(4);
        return true;
    }

但图片不想缩放

1 个答案:

答案 0 :(得分:0)

找到解决方案

by defauld MaximumScale< 4,所以我补充说:

mAttacher.setMaximumScale(5f);