1.MultiImageSelector依赖
compile 'com.github.lovetuzitong:MultiImageSelector:1.2'
2.添加权限
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<activity android:name=".MainActivity" android:configChanges="orientation|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
3 调用API
点单调用:
MultiImageSelector.create(Context).start(Activity, REQUEST_IMAGE);
详细调用API:
MultiImageSelector.create(Context context)