Skip to content

Commit

Permalink
add README
Browse files Browse the repository at this point in the history
  • Loading branch information
chihane committed Sep 19, 2015
1 parent 305aa78 commit 7dc49bf
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

/local.properties
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#PickerChu

PickerChu is an image pick-and-crop library for Android pika.

##Integration

Import module `PickerChu` into your project and simply add the following line to the `dependencies` section of your `build.gradle` file:

compile project(':PickerChu')

Or check this out: https://jitpack.io/#mlxy/PickerChu

##Usage

1. Build a `PickerChu` in your code:

```java
pickerChu = new PickerChu.Builder(this)
.saveIn(getExternalCacheDir())
.byAspectRatioOf(1, 1)
.inSizeOf(1024, 1024)
.onImageCropped(new PickerChu.OnImageCroppedListener() {
@Override
public void onImageCropped(Uri imageUri) {
// imageView.setImageURI(imageUri);
}
})
.build();
```

1. Handle `onActivityResult()` event:

```java
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
this.pickerChu.handleActivityResult(requestCode, resultCode, data);
}
```

1. Choose a way to get a picture:

```java
// pickerChu.takePhoto();
pickerChu.pickPicture();
```

##Author

**mlxy**

- <http://www.cnblogs.com/chihane/>
- <chihane@yeah.net>

##License

GNU General Public License version 2 ([GPL v2][1])

[1]: https://raw.githubusercontent.com/mlxy/PickerChu/master/LICENSE
2 changes: 1 addition & 1 deletion local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sat Sep 19 09:26:51 CST 2015
#Sat Sep 19 11:43:22 CST 2015
sdk.dir=D\:\\adt-bundle-windows-x86_64-20140702\\sdk

0 comments on commit 7dc49bf

Please sign in to comment.