Go to file
Gavriil Sitnikov 62b74ca0ee gradle update 2016-09-20 01:58:55 +03:00
.publishing Extract publishing stuff from build 2014-06-20 23:23:34 +02:00
example Another Travis fix 2015-09-08 23:39:24 +02:00
gradle/wrapper Bump versions for Lollipop and Android Studio 2014-12-30 00:01:17 +00:00
lib gradle update 2016-09-20 01:58:55 +03:00
.gitignore Gradle update 2014-06-13 10:53:12 +02:00
.travis.yml Override script to skip connectedCheck for now 2015-09-08 23:50:41 +02:00
CHANGELOG.md Cleaning 2015-11-20 16:09:39 +01:00
README.md Cleaning 2015-11-20 16:09:39 +01:00
build.gradle gradle file of lib removed 2016-02-26 05:24:46 +03:00
gradle.properties Update versions, README & CHANGELOG 2015-09-09 11:58:34 +02: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 1.0.0 2015-05-08 13:58:51 -04:00

README.md

I guess people are just cropping out all the sadness

An Android library project that provides a simple image cropping Activity, based on code from AOSP.

build status maven central changelog

Features

  • Gradle build & AAR
  • Modern UI
  • Backwards compatible to SDK 10
  • Simple builder for configuration
  • Example project

Usage

First, declare CropImageActivity in your manifest file:

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

Crop

Crop.of(inputUri, 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);
    }
}

Some attributes are provided to customise the crop screen. See the example project theme.

Pick

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

Crop.pickImage(activity)

Dependency

The AAR is published on Maven Central:

compile 'com.soundcloud.android:android-crop:1.0.1@aar'

Users

Apps that use this library include: SoundCloud, Depop, Polyvore, TextSecure

How does it look?

android-crop screenshot

License

This project is based on the AOSP camera image cropper via android-cropimage.

Copyright 2015 SoundCloud

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.