Need help with PickPhotoSample?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
werbhelius

Description

Photo Picker Of Android Library

457 Stars 89 Forks Apache License 2.0 218 Commits 5 Opened issues

Services available

Need anything else?

PickPhotoView

A Library help u to pick photos.

Click to download lastest demo ⬇️ or select Release Version

download

Last Update (2019.1.2)

v0.4.8

  1. update third part lib version
  2. fix some bug
  3. add proguard

Screenshot

one two

Dependency

License last-version

the last-version is releases-version

Gradle

  compile 'com.werb.pickphotoview:pickphotoview:0.4.8'  // Last Version

some Library already dependency

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'

New Version 0.3.6+ build with Kotlin new feature

LayoutContainer
, so you must add this command in your module build.gradle
gradle
apply plugin: 'kotlin-android-extensions'
and config this command in
android{}
gradle
androidExtensions {
    experimental = true
}
when new feature published in kotlin release version it will built-in code and no need for config

Usage

Make sure you have permissions about CAMERA and WRITE/READEXTERNALSTORAGE before use

PermissionsChecker : A Library help u to check permissions on Android M.

Register Provider in your app AndroidManifest.xml

    
        
    

Initialize PickPhotoView

 new PickPhotoView.Builder(MainActivity.this)
    .setPickPhotoSize(1)                  // select image size
    .setClickSelectable(true)             // click one image immediately close and return image
    .setShowCamera(true)                  // is show camera
    .setSpanCount(3)                      // span count
    .setLightStatusBar(true)              // lightStatusBar used in Android M or higher
    .setStatusBarColor(R.color.white)     // statusBar color
    .setToolbarColor(R.color.white)       // toolbar color
    .setToolbarTextColor(R.color.black)   // toolbar text color
    .setSelectIconColor(R.color.pink)     // select icon color
    .setShowGif(false)                    // is show gif
    .start();

onActivityResult

  @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 selectPaths = (ArrayList) data.getSerializableExtra(PickConfig.INTENT_IMG_LIST_SELECT);
            // do something u want
        }
    }

proguard

proguard-rules.pro

License

Apache2.0

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.