Skip to content

Convert CropImageOptions to data class with proper default parameters. #396

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [x.x.x] - unreleased

- CropImageOptions: Option to change progress bar color. [#390](https://github.com/CanHub/Android-Image-Cropper/pull/390)
- CropImageView: Use customOutputUri instance property as a fallback in startCropWorkerTask. [#401](https://github.com/CanHub/Android-Image-Cropper/issues/401)
- CropImageOptions: Option to change progress bar color. [#390](https://github.com/CanHub/Android-Image-Cropper/issues/390)
- Sample: Showcase 2:1 aspect ratio. [#386](https://github.com/CanHub/Android-Image-Cropper/issues/386)
- Update dependencies [#387](https://github.com/CanHub/Android-Image-Cropper/issues/387)
- Sample: Showcase 2:1 aspect ratio. [#386](https://github.com/CanHub/Android-Image-Cropper/pull/386)
- Update dependencies [#394](https://github.com/CanHub/Android-Image-Cropper/pull/394)
- Convert CropImageOptions to data class with proper default parameters. [#396](https://github.com/CanHub/Android-Image-Cropper/pull/396)

## [4.3.0] - 10/06/2022
### Added
Expand Down
2 changes: 0 additions & 2 deletions cropper/src/main/java/com/canhub/cropper/CropImageContract.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ import androidx.activity.result.contract.ActivityResultContract
*
* If you do not provide an uri in the input the user will be asked to pick an image before cropping.
*/

class CropImageContract :
ActivityResultContract<CropImageContractOptions, CropImageView.CropResult>() {

override fun createIntent(context: Context, input: CropImageContractOptions): Intent {
input.cropImageOptions.validate()
return Intent(context, CropImageActivity::class.java).apply {
val bundle = Bundle()
bundle.putParcelable(CropImage.CROP_IMAGE_EXTRA_SOURCE, input.uri)
Expand Down
Loading