Android Library that helps to easily integrate image choose option. It shows camera and gallery option. You can select Multiple images from gallery.
Now you can set multi-selection to gallery intent like below to select multiple images
ImagePicker.build(new DialogConfiguration()
.setTitle("Choose")
.setResultImageDimension(1000, 1000)
.setOptionOrientation(LinearLayoutCompat.HORIZONTAL), new ImageMultiResultListener() {
@Override
public void onImageResult(ArrayList<ImageResult> imageResult) {
Log.e(LOG_TAG, "onImageResult:Number of image picked " + imageResult.size());
if (imageResult.size() > 0) {
ivImage.setImageBitmap(imageResult.get(0).getBitmap());
}
}
}).show(getChildFragmentManager());
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.NileshJarad:ImagePicker:v1.0.10'
}
<application
...>
<provider
android:name="com.nj.imagepicker.provider.ImageProvider"
android:authorities="${applicationId}.com.nj.imagepicker.fileprovider"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
...
</application>
ImagePicker.build(new DialogConfiguration()
.setTitle("Choose")
.setOptionOrientation(LinearLayoutCompat.HORIZONTAL),
new ImageResultListener() {
@Override
public void onImageResult(ImageResult imageResult) {
ivImage.setImageBitmap(imageResult.getBitmap());
}
}).show(getSupportFragmentManager());
ImagePicker.build(new DialogConfiguration()
, new ImageResultListener() {
@Override
public void onImageResult(ImageResult imageResult) {
ivImage.setImageBitmap(imageResult.getBitmap());
}
}).show(getSupportFragmentManager());
ImagePicker.build(new DialogConfiguration()
.setTitle("Choose")
.setOptionOrientation(LinearLayoutCompat.HORIZONTAL), new ImageResultListener() {
@Override
public void onImageResult(ImageResult imageResult) {
ivImage.setImageBitmap(imageResult.getBitmap());
}
}).show(getChildFragmentManager());
DialogConfiguration configuration = new DialogConfiguration()
.setTitle("Choose Options")
.setOptionOrientation(LinearLayoutCompat.HORIZONTAL)
.setBackgroundColor(Color.GRAY)
.setNegativeText("No")
.setResultImageDimension(200,200)
.setNegativeTextColor(Color.WHITE)
.setTitleTextColor(Color.WHITE);
1.0.7 (2018-01-15)
Implemented enhancements:
Resolved build error for build gradle plugin
1.0.6 (2018-01-15)
Implemented enhancements:
- Added multiple image selection from gallery option
1.0.5 (2017-11-10)
1.0.4 (2017-07-27)
1.0.3 (2017-03-01)
Implemented enhancements:
- Closed issue of image from Camera for devices running Android L (Lollipop)
- Added configurations for the setting background color, text color, dimension of result image
- Removed unused library #1
Merged pull requests:
Removed unused library #1(Sagar Gangawane)
Closed issues:
Closed issue Camera Image is not showing #2