Multiple media picker and cropper is a library to pick files, images and videos from storage directory. You can also crop multiple images from gallery or camera.
1.4.1
To use this library in your android project, just simply add the following dependency into your build.gradle
dependencies {
compile 'com.crop.multiple:multipleImagePickerLib:1.4.1'
}This library uses the following third parties
dependencies {
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile files('libs/universal-image-loader-1.9.4.jar')
compile 'com.facebook.fresco:fresco:0.14.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
}dependencies {
compile 'com.crop.multiple:multipleImagePickerLib:1.4.1'
}To match your app toolbar color, set this attribute in your application.
Define.ACTIONBAR_COLOR = getResources().getColor(R.color.colorPrimary);All activities uses a custom toolbar with NoActionBar Theme, please use this theme in your main app otherwise app will crash. To, override this, please declare all activities in your manifest with NoActionBar Theme.
Features supported in this library
MediaBuilder Specifications :-
takeVideo() // Takes a video. Default is image
setImageQuality(int size) //Takes the size between 0 to 100
setPlayIcon(int playResId) //Sets the play icon preview. Have to be a valid resource id
setVideoSize(int size) // Sets the size of video in MBs for camera. Default is -1
setVideoDuration(long seconds)// Sets the duration of video in seconds for camera. Default is -1
fromGallery() // Picks media file from gallery
fromCamera() //Captures media file from camera. Default is gallery
doCropping() // Cropping functionality for images only. Default is false
isSquareCrop() // Crops the image in 1:1 ratio
withAspectRatio(int x, int y) // Custom aspect ratio. Set isSquareCrop() to false then only this method will work
MediaFactory start(MediaBuilder mediaBuilder) // Takes the builder object and starts the media capturing process
MediaFactory.create().clearCache(MainActivity.this); // Clears local cache of compressed images from sd cardAnd to get the files, you have to add this piece of code to Activity's onActivityResult in your app.
ArrayList<String> pathArrayList = mediaFactory.onActivityResult(requestCode, resultCode, data);Apache 2.0