Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not support disable medium scale ?? #743

Open
JSBDeveloper opened this issue Feb 17, 2020 · 1 comment
Open

not support disable medium scale ?? #743

JSBDeveloper opened this issue Feb 17, 2020 · 1 comment

Comments

@JSBDeveloper
Copy link

not support disable medium scale ??

@Beoyan-1
Copy link

Beoyan-1 commented Apr 1, 2020

Modifying these at PhotoViewAttacher worked for me

  @Override
        public boolean onDoubleTap(MotionEvent ev) {
            try {
                float scale = getScale();
                float x = ev.getX();
                float y = ev.getY();
                if (scale >= getMinimumScale() && scale < getMaximumScale()) {
                    setScale(getMaximumScale(), x, y, true);
                } else {
                    setScale(getMinimumScale(), x, y, true);
                }
            } catch (ArrayIndexOutOfBoundsException e) {
                // Can sometimes happen when getX() and getY() is called
            }
            return true;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants