diff --git a/CHANGELOG.md b/CHANGELOG.md index 952b80d..5051484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -* Migrate to Kotlin 1.7.0 +## [2.3.17] - 2022-08-23 + +* Migrate to Kotlin 1.7.10 * Update internal dependencies +* Let user pick multiple files in the gallery mode +* Let user define the output format ## [2.1.16] - 2022-06-22 diff --git a/README.md b/README.md index 717a38c..e878dd5 100644 --- a/README.md +++ b/README.md @@ -63,15 +63,15 @@ Where `$libVersion` = [![libVersion](https://img.shields.io/github/release/drjac **Java** ```java - ActivityResultLauncher launcher = - registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), (ActivityResult result) -> { - if (result.getResultCode() == RESULT_OK) { - Uri uri = result.getData().getData(); - // Use the uri to load the image - } else if (result.getResultCode() == ImagePicker.RESULT_ERROR) { - // Use ImagePicker.Companion.getError(result.getData()) to show an error - } - }); +ActivityResultLauncher launcher= + registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),(ActivityResult result)->{ + if(result.getResultCode()==RESULT_OK){ + Uri uri=result.getData().getData(); + // Use the uri to load the image + }else if(result.getResultCode()==ImagePicker.RESULT_ERROR){ + // Use ImagePicker.Companion.getError(result.getData()) to show an error + } + }); ``` **If you want both Camera and Gallery:** @@ -88,22 +88,22 @@ Where `$libVersion` = [![libVersion](https://img.shields.io/github/release/drjac **Java** ```java - ImagePicker.Companion.with(this) - .crop() - .cropOval() +ImagePicker.Companion.with(this) + .crop() + .cropOval() .maxResultSize(512,512,true) .provider(ImageProvider.BOTH) //Or bothCameraGallery() .createIntentFromDialog((Function1)(new Function1(){ - public Object invoke(Object var1) { - this.invoke((Intent) var1); - return Unit.INSTANCE; - } - - public final void invoke(@NotNull Intent it) { - Intrinsics.checkNotNullParameter(it, "it"); - launcher.launch(it); - } - })); +public Object invoke(Object var1){ + this.invoke((Intent)var1); + return Unit.INSTANCE; + } + +public final void invoke(@NotNull Intent it){ + Intrinsics.checkNotNullParameter(it,"it"); + launcher.launch(it); + } + })); ``` **If you want just one option:** @@ -122,7 +122,7 @@ Where `$libVersion` = [![libVersion](https://img.shields.io/github/release/drjac **Java** ```java - ImagePicker.Companion.with(this) +ImagePicker.Companion.with(this) .crop() //Crop image(Optional), Check Customization for more option .cropOval() //Allow dimmed layer to have a circle inside .cropFreeStyle() //Let the user to resize crop bounds diff --git a/build.gradle b/build.gradle index 564b98e..1c56ba7 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,8 @@ buildscript { ext { kotlin_version = '1.7.10' - versionCode = 36 - versionName = '2.1.16' + versionCode = 37 + versionName = '2.3.17' } repositories {