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

Add a paramter to pass extra padding around crop rect #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ammargitham
Copy link

When using the CroppingPreview directly, or the cropper dialog with 0 padding, the crop handles overlap the back gestures area. This change allows the user to pass extra padding so that the crop handles do not overlap the gesture area.

I think instead of the library adding the gesture padding internally, it should be up to the user to pass the values.

For the demo to work correctly, I had to set WindowCompat.setDecorFitsSystemWindows(window, false) in the MainActivity. Otherwise WindowInsets.mandatorySystemGestures will always be zero.

Before padding:

before.extra.padding.mp4

After padding:

after.extra.padding.mp4

This allows the crop handles to not overlap system gesture area.
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

Successfully merging this pull request may close these issues.

1 participant