1

我想在双击后设置 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;
    }

但图像不想缩放

4

1 回答 1

0

找到解决方案

默认情况下,MaximumScale < 4,所以我添加:

mAttacher.setMaximumScale(5f);
于 2015-01-14T13:25:14.707 回答