PickPhotoView
一个帮助你在 Android上完成图片选择的库
欢迎大家来使用和测试,有不足的地方还希望大家可以提出来,我都会虚心改进
轮子大家测!欢迎提 issue 和我交流
Github地址 :https://github.com/Werb/PickPhotoSample
Demo下载地址 :https://fir.im/hm38
Screenshot
Dependency
👾👾👾👾👾👾👾👾👾👾 click me !
the last-version is this ⬆️
Gradle
compile 'com.werb.pickphotoview:pickphotoview:last-version'
Maven
<dependency>
<groupId>com.werb.pickphotoview</groupId>
<artifactId>pickphotoview</artifactId>
<version>0.0.4-beta8</version>
<type>pom</type>
</dependency>
Eclipse
Sorry ,You are out !
Usage
Make sure you have permissions about CAMERA and WRITE/READ_EXTERNAL_STORAGE before use
Initialize PickPhotoView
new PickPhotoView.Builder(context)
.setPickPhotoSize(9) //select max size
.setShowCamera(true) //is show camera
.setSpanCount(4) //SpanCount
.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) {
List<String> selectPaths = (List<String>) data.getSerializableExtra(PickConfig.INTENT_IMG_LIST_SELECT);
// do something u want
}
}