Update README.md
This commit is contained in:
parent
f652b432da
commit
b382db70d9
21
README.md
21
README.md
|
|
@ -27,7 +27,26 @@ Declare `MultiImageSelectorActivity` in your `AndroidManifest.xml` .
|
||||||
```
|
```
|
||||||
|
|
||||||
* Step 2
|
* Step 2
|
||||||
Call image selector activity in your code, eg.
|
Call image selector simplest in your code, eg. ( From `version-1.1` )
|
||||||
|
|
||||||
|
``` java
|
||||||
|
// Multi image selector form an Activity
|
||||||
|
MultiImageSelector.create(Context)
|
||||||
|
.start(Activity, REQUEST_CODE);
|
||||||
|
```
|
||||||
|
|
||||||
|
Detail Api.
|
||||||
|
``` java
|
||||||
|
MultiImageSelector.create(Context)
|
||||||
|
.showCamera(boolean) // show camera or not. true by default
|
||||||
|
.count(int) // max select image size, 9 by default. used width #.multi()
|
||||||
|
.single() // single mode
|
||||||
|
.multi() // multi mode, default mode;
|
||||||
|
.origin(ArrayList<String>) // original select data set, used width #.multi()
|
||||||
|
.start(Activity/Fragment, REQUEST_CODE);
|
||||||
|
```
|
||||||
|
|
||||||
|
Also support traditional `Intent` :
|
||||||
``` java
|
``` java
|
||||||
Intent intent = new Intent(mContext, MultiImageSelectorActivity.class);
|
Intent intent = new Intent(mContext, MultiImageSelectorActivity.class);
|
||||||
// whether show camera
|
// whether show camera
|
||||||
|
|
|
||||||
21
README_zh.md
21
README_zh.md
|
|
@ -27,7 +27,26 @@
|
||||||
```
|
```
|
||||||
|
|
||||||
* 第2步
|
* 第2步
|
||||||
代码中调用,例如:
|
在你的代码中简单调用( 版本`version-1.1`之后支持 ), eg.
|
||||||
|
|
||||||
|
``` java
|
||||||
|
// Multi image selector form an Activity
|
||||||
|
MultiImageSelector.create(Context)
|
||||||
|
.start(Activity, REQUEST_CODE);
|
||||||
|
```
|
||||||
|
|
||||||
|
详细可使用的Api.
|
||||||
|
``` java
|
||||||
|
MultiImageSelector.create(Context)
|
||||||
|
.showCamera(boolean) // 是否显示相机. 默认为显示
|
||||||
|
.count(int) // 最大选择图片数量, 默认为9. 只有在选择模式为多选时有效
|
||||||
|
.single() // 单选模式
|
||||||
|
.multi() // 多选模式, 默认模式;
|
||||||
|
.origin(ArrayList<String>) // 默认已选择图片. 只有在选择模式为多选时有效
|
||||||
|
.start(Activity/Fragment, REQUEST_CODE);
|
||||||
|
```
|
||||||
|
|
||||||
|
同样支持老版本的 `Intent` 调用方法:
|
||||||
```java
|
```java
|
||||||
Intent intent = new Intent(mContext, MultiImageSelectorActivity.class);
|
Intent intent = new Intent(mContext, MultiImageSelectorActivity.class);
|
||||||
// 是否显示调用相机拍照
|
// 是否显示调用相机拍照
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ android {
|
||||||
minSdkVersion 12
|
minSdkVersion 12
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.1"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue