Add new ImagePickerActivity to display the list of images with folders support. The new Image Picker closes issues #27, #37, and #38.
Part -1 contains the files related to the new image picker's library module.
New Features :
Multiple image selection with maximum image count support
Folder-wise selection
Freehand cropping
Support for new photo picker for Android 13+
Maximum image size support
Image extension support
All new UI enhancement with customizable styles
File Changes:
Removed
FunctionProvider.kt - Moved all content to DataModel to keep all the models in the same place
ImagePickerActivityClass.kt - The class is replaced by ImagePicker.kt. For all the new APIs related to the picker, the new class will handle everything.
ImagePickerBottomsheet.kt - The class is replaced by SSPickerOptionsBottomSheet.kt. The bottom sheet is for the picker option only and the styling is also changed via theme properties so as to maintain all created a new bottom sheet class.
Modified
Extensions.kt - Removed permission-related code as it doesn't require writing permission. Removed glide from the dependency the load image functionality can be provided by the developer itself. Added a bunch of new functions as extension with their description.
Usage:
Add ImagePickerActivity into your AndroidManifest.xml. SSImagePicker is the default theme for image picker activity.
If you want to use Picker options Bottomsheet then implement SSPickerOptionsBottomSheet.ImagePickerClickListener in your fragment or activity. onImageProvider method will give the selected provider type.
val pickerOptionBottomSheet = SSPickerOptionsBottomSheet.newInstance()
pickerOptionBottomSheet.show(supportFragmentManager,"tag")
....
override fun onImageProvider(provider: ImageProvider) {
when (provider) {
ImageProvider.GALLERY -> {
//Open gallery
}
ImageProvider.CAMERA -> {
//Open camera
}
ImageProvider.NONE -> {}
}
}
Open Image Picker from activity or fragment via object of ImagePicker class.
private val imagePicker: ImagePicker = ImagePicker.with(callback = this)
imagePicker.open(PickerType.GALLERY, this)
Add customization to the image picker via the image picker object. All the methods with descriptions are declared inside ImagePicker.kt file.
Add new ImagePickerActivity to display the list of images with folders support. The new Image Picker closes issues #27, #37, and #38.
Part -1 contains the files related to the new image picker's library module.
New Features :
File Changes:
Removed
Modified
Usage:
Add ImagePickerActivity into your AndroidManifest.xml. SSImagePicker is the default theme for image picker activity.
If you want to use Picker options Bottomsheet then implement SSPickerOptionsBottomSheet.ImagePickerClickListener in your fragment or activity. onImageProvider method will give the selected provider type.
Add customization to the image picker via the image picker object. All the methods with descriptions are declared inside ImagePicker.kt file.
To get results in activity or fragment implement ImagePickerResultListener.