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

Swipe Up/Down to Close Fullscreen Image #212

Open
eugenkiss opened this issue Apr 14, 2015 · 4 comments
Open

Swipe Up/Down to Close Fullscreen Image #212

eugenkiss opened this issue Apr 14, 2015 · 4 comments

Comments

@eugenkiss
Copy link
Owner

From a reviewer:

Also, pinch to close it's useless on one-hand mode, that's why I suggested swipe up/down to close full screen.

@mitchross
Copy link
Contributor

where is the pinch logic located?

@eugenkiss
Copy link
Owner Author

The pinch to close logic is located at the end of MediaView.java:

attacher.setOnMatrixChangeListener(new PhotoViewAttacher.OnMatrixChangedListener() {

Both the OnMatrixChangeListener as well as the code inside dispatchTouchEvent interact to achieve the desired effect.

@tclemente
Copy link

So I think this might be able to be implemented by this library, but I'm not exactly sure of how to do it with your existing code
https://github.com/liuguangqiang/SwipeBack

@eugenkiss
Copy link
Owner Author

I guess one could put a gesturedetector on some view that is on top of imageview and listen for certain swipe gestures. This approach is probably easier than using another library because of the interaction with the viewpager. A conceptually better approach is to extend the photoattacher class with the desired functionality.

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

No branches or pull requests

3 participants