explaingit

jdamcd/android-crop

4,516JavaAudience · developerComplexity · 2/5Setup · easy

TLDR

A deprecated Android library from SoundCloud that adds image cropping to mobile apps, based on the original AOSP camera crop tool. Drop it in, show a crop screen, get back the trimmed image, no heavy setup required.

Mindmap

mindmap
  root((android-crop))
    Crop Screen
      Draggable crop frame
      Full screen Activity
      Theme customizable
    API
      One line to start
      Activity result callback
      Image picker utility
    Compatibility
      Back to SDK level 10
      Gradle build system
      Maven Central dist
    Origin
      SoundCloud codebase
      AOSP camera tool
      Open source base
    Status
      Deprecated
      Fork recommended
      Still functional
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Let users crop a profile photo before uploading it in your Android app.

USE CASE 2

Build a photo editor flow where users pick an image from their gallery and trim it to size.

USE CASE 3

Add quick avatar or thumbnail cropping to any Android app with minimal code.

Tech stack

JavaAndroidGradleMaven CentralAOSP

Getting it running

Difficulty · easy Time to first run · 30min

Add via Gradle from Maven Central, call the one-line API to launch crop, handle result in onActivityResult. Note: project is deprecated, consider forking or finding a maintained alternative.

No license details were mentioned in the explanation.

In plain English

android-crop is an Android library that adds image cropping to mobile apps. It comes from SoundCloud's codebase and is based on the image cropping tool originally built into Android's camera app (AOSP, the Android Open Source Project). The library packages that functionality as something any Android developer can drop into their own app. The core of the library is a built-in Activity, which in Android terms means a full-screen UI screen dedicated to one task. When an app starts the crop screen, the user sees the image with a draggable crop frame, adjusts the area they want to keep, and confirms. The result comes back to the app through Android's standard activity result mechanism. The API is intentionally brief: a one-line call starts the crop process, and a few lines in the result handler receive the cropped image. The library also includes a utility method for opening the device image picker, so an app can let the user select a photo from their gallery and then immediately crop it. Configuration is mostly handled through Android theme attributes, so the look of the crop screen can be adjusted to match an app's visual style without code changes. The library targets older Android versions as well as current ones, with compatibility going back to SDK level 10. It was distributed through Maven Central, the standard package repository for Java and Android projects, using Gradle as the build system. The README marks the project as deprecated and no longer maintained. The library still works as described, but the author notes that anyone needing changes should fork it or look for a maintained replacement.

Copy-paste prompts

Prompt 1
I'm using the android-crop library (jdamcd/android-crop) in my Android app. Show me the minimal Java code to launch the crop screen from a button click and receive the cropped image in onActivityResult.
Prompt 2
Using android-crop, how do I open the device image picker and immediately pass the selected photo into the crop screen? Show the full Activity code.
Prompt 3
I want to customize the look of the android-crop screen to match my app's dark theme. How do I use Android theme attributes to change the crop UI colors without touching library code?
Prompt 4
android-crop is deprecated. I'm currently using it in a Java Android app, what are the best maintained replacement libraries I should consider migrating to, and how similar is the API?
Open on GitHub → Explain another repo

← jdamcd on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.