PickPhotoView
一個(gè)幫助你在 Android上完成圖片選擇的庫
歡迎大家來使用和測(cè)試皂岔,有不足的地方還希望大家可以提出來麸锉,我都會(huì)虛心改進(jìn)
輪子大家測(cè)复隆!歡迎提 issue 和我交流
Github地址 :https://github.com/Werb/PickPhotoSample
Demo下載地址 :https://fir.im/hm38
Screenshot
PickPhotoView
PickPhotoView
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
}
}