1

I want to set scale=4 after doubletap

in onCreate():

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

I'm setting mAttacher.setOnDoubleTapListener(this); and in method of this interface doing it:

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

but image don't want to scale

NickUnuchek
  • 11,794
  • 12
  • 98
  • 138
  • Did you set a scaleType via XML on the ImageView? This could change behavior of setScale method I believe. – kandroidj Jan 14 '15 at 13:22

1 Answers1

0

found solution

by defauld MaximumScale is < 4, so I add:

mAttacher.setMaximumScale(5f);
NickUnuchek
  • 11,794
  • 12
  • 98
  • 138