A Library help u to pick photos.
Click to download lastest demo ⬇️ or select Release Version
- support select gif
- update image preview and select logic
- optimize UI
Thanks Ray Li Pull requests
the last-version is releases-version️
compile 'com.werb.pickphotoview:pickphotoview:0.3.0' // Last Version
some Library already dependency
- Glide
- Recyclerview
- Gson
If you don't want to dependency this Library version , you can replace it just like
compile ('com.werb.pickphotoview:pickphotoview:last-version',{
exclude group: 'com.google.code.gson'
})
compile 'com.google.code.gson:gson:XXXX'
<dependency>
<groupId>com.werb.pickphotoview</groupId>
<artifactId>pickphotoview</artifactId>
<version>last-version</version>
<type>pom</type>
</dependency>
Sorry ,You are out !
Make sure you have permissions about CAMERA and WRITE/READ_EXTERNAL_STORAGE before use
PermissionsChecker : A Library help u to check permissions on Android M.
<provider
android:name="com.werb.pickphotoview.provider.PickProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/pick_file_paths"/>
</provider>
new PickPhotoView.Builder(context)
.setPickPhotoSize(9) //select max size
.setShowCamera(true) //is show camera
.setSpanCount(4) //SpanCount
.setLightStatusBar(true) // custom theme
.setStatusBarColor("#ffffff") // custom statusBar
.setToolbarColor("#ffffff") // custom toolbar
.setToolbarIconColor("#000000") // custom toolbar icon
.setSelectIconColor("#00C07F") // custom select icon
.start();
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == 0){
return;
}
if(data == null){
return;
}
if (requestCode == PickConfig.PICK_PHOTO_DATA) {
ArrayList<String> selectPaths = (ArrayList<String>) data.getSerializableExtra(PickConfig.INTENT_IMG_LIST_SELECT);
// do something u want
}
}