Alex-Dobrynin / Xamarin.Controls.ImageCropper

Cross platform Xamarin library to crop and rotate images
MIT License
10 stars 2 forks source link

No controls showing on cropping screen. #10

Closed JacobRustyDev closed 5 months ago

JacobRustyDev commented 5 months ago

I've got an app targeting net7-android33 so I can't use the latest package version available on nuget. I'm forced to use older versions. Currently I have version 1.1.2 installed and when you load up the cropping screen the ui for picking what part of the image to crop shows but no buttons to confirm selection or rotate, etc. show up.

Any chance this is just a bug with those older versions? Can the newer versions also support net7-android33?

Alex-Dobrynin commented 5 months ago

Unfortunately no. All I can suggest you is to update the .net version of your project.

JacobRustyDev commented 5 months ago

I still have this problem on a .net8-android target with the latest nuget package installed var result = await ImageCropper.Current.Crop(new CropSettings() { AspectRatioX = 1, AspectRatioY = 1, CropShape = CropSettings.CropShapeType.Rectangle, PageTitle = "Crop" }, path); This is the code i'm using to initialize the cropper.

I've added an image so you can see the behavior I'm seeing.

Screenshot_20240625-123451

Alex-Dobrynin commented 5 months ago

Have you tried sample project from this repo. Is there the same behavior?

JacobRustyDev commented 5 months ago

After looking at your example, looks like I was using a different value in the activity theme in the manifest. After switching it to what the sample had it seems to work. Thanks for letting me know about the sample.

1 more thing in your documentation for .Net Android you say you need this in the OnCreate method Plugin.Maui.ImageCropper.Platform.Droid.Init(this); which won't compile.

Your sample shows this which does work Controls.ImageCropper.Platform.Droid.Init(this);

Alex-Dobrynin commented 5 months ago

Thanks, will correct