Tag Archives: Crop Image

How to crop an Image in Android?

By | December 15, 2012

This is a sample program that launches the camera and crop the captured image. Check this link to another crop image example. http://www.coderzheaven.com/2011/03/15/crop-an-image-in-android/ This is the layout xml. activity_main.xml [xml] <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="3dp" android:text="@string/intro" android:textStyle="bold" /> <Button android:id="@+id/capture_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/capture" /> <ImageView android:id="@+id/picture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="5dp" android:contentDescription="@string/picture"… Read More »