1

I'm using uk.co.senab.photoview.PhotoView.
When zoom-in, the image of photoview will larger than mobile screen.
So, I want to make button that move mobile screen to center of the image, and the image still zoomed. I have no idea which variable I have to set in OnClickListener.
I try these but nothing happen.

moveToCenterButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        mAttacher.getDisplayRect().left = 100;
        mAttacher.getDisplayRect().top = 300;
    }
});
Zero0Ho
  • 166
  • 1
  • 1
  • 9

1 Answers1

0

setScale has x, y argument that is the (x,y) position of your top-left corner of your view.

mAttacher.setScale(scale, x, y, animate);
Zero0Ho
  • 166
  • 1
  • 1
  • 9