Go to file
Jamie McDonald ef9eab9bc7 Make MonitoredActivity abstract 2014-03-18 10:20:35 +01:00
example Return errors with their own result code 2014-03-16 13:25:07 +01:00
gradle/wrapper Empty project 2014-03-12 11:47:34 +01:00
lib Make MonitoredActivity abstract 2014-03-18 10:20:35 +01:00
.gitignore Removed IDE files 2014-03-16 12:33:51 +01:00
.travis.yml Make MonitoredActivity abstract 2014-03-18 10:20:35 +01:00
README.md Added build status to README 2014-03-18 00:16:26 +01:00
build.gradle Make MonitoredActivity abstract 2014-03-18 10:20:35 +01:00
gradle.properties Empty project 2014-03-12 11:47:34 +01:00
gradlew Removed annotation dependency to make build work 2014-03-12 14:21:52 +01:00
gradlew.bat Empty project 2014-03-12 11:47:34 +01:00
screenshot.png Updated README & screenshot 2014-03-13 22:12:54 +01:00
settings.gradle Added empty example project 2014-03-12 12:33:18 +01:00

README.md

I guess people are just cropping out all the sadness

This is another Android library project providing a simple image cropping Activity, based on code from AOSP.

Build Status

Goals

I started this in my hacker time with the intention of replacing our dated android-cropimage fork.

  • Gradle build with AAR & ApkLib artifacts
  • Modern UI
  • Backwards compatible to Gingerbread
  • Simple builder for configuration
  • Example project
  • More tests, less unused complexity

Usage

First, declare CropImageActivity in your manifest file:

<activity android:name="com.soundcloud.android.crop.CropImageActivity" />

Crop

new Crop(inputUri).output(outputUri).asSquare().start(activity)

Listen for the result of the crop (see example project if you want to do some error handling):

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent result) {
    if (requestCode == Crop.REQUEST_CROP && resultCode == RESULT_OK) {
        doSomethingWithCroppedImage(outputUri);
    }
}

Pick

The library provides a utility method to start an image picker:

Crop.pickImage(activity)

How does it look?

android-crop screenshot

License & Credits

Apache License, version 2.
Most of the cropping code originates from AOSP.
Thanks to android-cropimage contributors.