Skip to content

API: Deprecate CropImageContract. - #637

Merged
vanniktech merged 1 commit into
mainfrom
deprecate-CropImageContract
Aug 5, 2024
Merged

API: Deprecate CropImageContract.#637
vanniktech merged 1 commit into
mainfrom
deprecate-CropImageContract

Conversation

@vanniktech

Copy link
Copy Markdown
Contributor

No description provided.

@vanniktech
vanniktech merged commit 7eb3191 into main Aug 5, 2024
@vanniktech
vanniktech deleted the deprecate-CropImageContract branch August 5, 2024 10:00
@david-allison

Copy link
Copy Markdown

@vanniktech Is there a brief rationale/documentation on the reasons for this deprecation?

PS: Thank you for the library!

@vanniktech

Copy link
Copy Markdown
Contributor Author

These contracts cause a lot of problems because people want to customize it, they expect different functionality, then in addition they want the Activity to be different with different feature sets, etc. Maintaining all of this becomes a mess, additionally there was the migration from the previous OnActivityResult mechanism to the new Contract API.

I want this library to evolve and support more things. The focus should be on the Image Cropping, not things that are around like the Activity & mechanism how images are loaded (Gallery/Camera/etc). Therefore I've decided to deprecate the provided Activity & the Contracts. I will keep them around and remove them with a 5.x version. The code works, so if you want to get rid of the deprecation, just copy paste the code into your application and you're done.

CropImageView is the way forward. Then everyone can decide how it should be displayed (Activity/Fragment/Compose) and what it should display (Image via Camera/Gallery/etc) and also when.

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.

2 participants