MultiImageSelector

Image selector for Android device. Support single choice and multi-choice.

中文文档

ART

Example1 Select1 Select2 Select3


Run Demo

./gradlew installDebug

Quick Start

dependencies { compile 'com.github.lovetuzitong:MultiImageSelector:1.2' }


* Step 1 
Set your `AndroidManifest.xml` as below:
```xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application

    ...

    <!--Image Selector Entry-->
    <activity
        android:configChanges="orientation|screenSize"
        android:name="me.nereo.multi_image_selector.MultiImageSelectorActivity" />
</application>
// Multi image selector form an Activity
MultiImageSelector.create(Context)
        .start(Activity, REQUEST_IMAGE);

Detail Api.

MultiImageSelector.create(Context)
        .showCamera(boolean) // show camera or not. true by default
        .count(int) // max select image size, 9 by default. used width #.multi()
        .single() // single mode
        .multi() // multi mode, default mode;
        .origin(ArrayList<String>) // original select data set, used width #.multi()
        .start(Activity/Fragment, REQUEST_IMAGE);

Also support traditional Intent :

Intent intent = new Intent(mContext, MultiImageSelectorActivity.class);
// whether show camera
intent.putExtra(MultiImageSelectorActivity.EXTRA_SHOW_CAMERA, true);
// max select image amount
intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_COUNT, 9);
// select mode (MultiImageSelectorActivity.MODE_SINGLE OR MultiImageSelectorActivity.MODE_MULTI)
intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_MODE, MultiImageSelectorActivity.MODE_MULTI);
// default select images (support array list)
intent.putStringArrayListExtra(MultiImageSelectorActivity.EXTRA_DEFAULT_SELECTED_LIST, defaultDataArray);
startActivityForResult(intent, REQUEST_IMAGE);

Custom Activity Style


Change Log


Thanks


License

The MIT License (MIT)

Copyright (c) 2015 Nereo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.