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

Make sidebar pan gesture customizable #82

Open
ElteHupkes opened this issue Feb 27, 2018 · 3 comments
Open

Make sidebar pan gesture customizable #82

ElteHupkes opened this issue Feb 27, 2018 · 3 comments

Comments

@ElteHupkes
Copy link
Contributor

ElteHupkes commented Feb 27, 2018

The pan gesture used to open the sidebar overrides most other gestures in the content view that it targets, and doesn't mark itself as "failed" when it decides to ignore a certain gesture. This makes it very hard to use other gestures in this view. When implementing a custom gesture some success can be achieved by being creative with ShouldBeRequiredToFailBy... and the likes, but when you do not have control over the other gesture recognizer (my concrete example: a swipe left to start UITableViewCell editing mode) you're basically left without options.

The solution would be to

  1. Make the pan gesture fail appropriately (can be as simple as returning false from SlideoutPanDelegate.ShouldReceiveTouch() when the touch is not inside the gesture active area) and / or
  2. Allow access to the gesture recognizer so a custom delegate can be used. Sidebar.PanGesture is public, but because the actual _sidebar is a private property of the SidebarController it can currently only be accessed with reflection (which is what I'm doing to work around the problem right now).

I'd be willing to submit a PR for one or both of these changes if this sounds reasonable to you.

@jdehlin
Copy link
Collaborator

jdehlin commented Feb 27, 2018

I've had a bunch of people submit issues related to this and never knew how to fix it. If you could submit a PR with those fixes that would be great!

ElteHupkes added a commit to ElteHupkes/Xamarin-Sidebar that referenced this issue Feb 28, 2018
@ElteHupkes
Copy link
Contributor Author

Okay, see #83 . Let me know if I missed anything!

jdehlin added a commit that referenced this issue Feb 28, 2018
@martijn00
Copy link
Member

Fixed in: #84

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

3 participants