ian-hamlin / xamarin.arthurhub.android-image-cropper Goto Github PK
View Code? Open in Web Editor NEWXamarin bindings for ArthurHub/Android-Image-Cropper
Xamarin bindings for ArthurHub/Android-Image-Cropper
When targetting SDK level 28 or higher, calling CropImageView
's SetCropShape
with CropImageView.CropShape.Oval
results in an java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
exception.
At:
at android.graphics.Canvas.checkValidClipOp(Canvas.java:779) at android.graphics.Canvas.clipPath(Canvas.java:1007) at com.theartofdev.edmodo.cropper.CropOverlayView.drawBackground(CropOverlayView.java:635) at com.theartofdev.edmodo.cropper.CropOverlayView.onDraw(CropOverlayView.java:579)
This was working correctly while targeting earlier SDK versions.
After a quick investigation this is because ArthurHub/Android-Image-Cropper 2.7.0 (which is used by the binding) uses Region.Op.XOR
which isn't supported anymore.
https://github.com/ArthurHub/Android-Image-Cropper/blob/092a39533aa760472299a442773c7e2eee404de8/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropOverlayView.java#L635
This has been fixed in the 2.8.0 version of the library and it is compatible with SDK level 28.
To fix this issue, the bindings would need to be updated to the 2.8.0 version.
I tried updating the bindings myself by forking the project, but I've run into the problem where most of the classes don't appear in the final binding or the api.xml file so it's not working.
Can you add this library into nuget please?
Test
I am able to see the picture taken then the crop bound box appears but there is no "Crop Button". Thus, only way to return to invoking activity is by pressing the back key which cancels the process. Such a good library but can't be used because of this!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.