public class CropImageOptions
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
int |
activityMenuIconColor
the color to use for action bar items icons
|
java.lang.CharSequence |
activityTitle
the title of the
CropImageActivity |
boolean |
allowCounterRotation
if to allow counter-clockwise rotation during cropping (activity)
|
boolean |
allowFlipping
if to allow (all) flipping during cropping (activity)
|
boolean |
allowRotation
if to allow (all) rotation during cropping (activity)
|
int |
aspectRatioX
the X value of the aspect ratio.
|
int |
aspectRatioY
the Y value of the aspect ratio.
|
boolean |
autoZoomEnabled
if auto-zoom functionality is enabled.
default: true. |
int |
backgroundColor
the color of the overlay background around the crop window cover the image parts not in the
crop window.
|
int |
borderCornerColor
the color of the corner line
|
float |
borderCornerLength
the length of the corner line away from the corner.
|
float |
borderCornerOffset
the offset of corner line from crop window border.
|
float |
borderCornerThickness
thickness of the corner line.
|
int |
borderLineColor
the color of the guidelines lines
|
float |
borderLineThickness
the thickness of the guidelines lines in pixels.
|
static android.os.Parcelable.Creator<CropImageOptions> |
CREATOR |
int |
cropMenuCropButtonIcon
optional image resource to be used for crop menu crop icon instead of text
|
java.lang.CharSequence |
cropMenuCropButtonTitle
optional, the text of the crop menu crop button
|
CropImageView.CropShape |
cropShape
The shape of the cropping window.
|
boolean |
fixAspectRatio
whether the width to height aspect ratio should be maintained or free to change.
|
boolean |
flipHorizontally
whether the image should be flipped horizontally
|
boolean |
flipVertically
whether the image should be flipped vertically
|
CropImageView.Guidelines |
guidelines
whether the guidelines should be on, off, or only showing when resizing.
|
int |
guidelinesColor
the color of the guidelines lines
|
float |
guidelinesThickness
the thickness of the guidelines lines.
|
float |
initialCropWindowPaddingRatio
The initial crop window padding from image borders in percentage of the cropping image
dimensions.
|
android.graphics.Rect |
initialCropWindowRectangle
the initial rectangle to set on the cropping image after loading
|
int |
initialRotation
the initial rotation to set on the cropping image after loading (0-360 degrees clockwise)
|
int |
maxCropResultHeight
the max height the resulting cropping image is allowed to be, affects the cropping window
limits.
|
int |
maxCropResultWidth
the max width the resulting cropping image is allowed to be, affects the cropping window
limits.
|
int |
maxZoom
The max zoom allowed during cropping.
|
int |
minCropResultHeight
the min height the resulting cropping image is allowed to be, affects the cropping window
limits.
|
int |
minCropResultWidth
the min width the resulting cropping image is allowed to be, affects the cropping window
limits.
|
int |
minCropWindowHeight
the min height the crop window is allowed to be.
|
int |
minCropWindowWidth
the min width the crop window is allowed to be.
|
boolean |
multiTouchEnabled
if multi-touch should be enabled on the crop box default: false
|
boolean |
noOutputImage
if the result of crop image activity should not save the cropped image bitmap
|
android.graphics.Bitmap.CompressFormat |
outputCompressFormat
the compression format to use when writing the image
|
int |
outputCompressQuality
the quality (if applicable) to use when writing the image (0 - 100)
|
int |
outputRequestHeight
the height to resize the cropped image to (see options)
|
CropImageView.RequestSizeOptions |
outputRequestSizeOptions
the resize method to use on the cropped bitmap (see options documentation)
|
int |
outputRequestWidth
the width to resize the cropped image to (see options)
|
android.net.Uri |
outputUri
the Android Uri to save the cropped image to
|
int |
rotationDegrees
the amount of degrees to rotate clockwise or counter-clockwise
|
CropImageView.ScaleType |
scaleType
The initial scale type of the image in the crop image view
|
boolean |
showCropOverlay
if to show crop overlay UI what contains the crop window UI surrounded by background over the
cropping image.
default: true, may disable for animation or frame transition. |
boolean |
showProgressBar
if to show progress bar when image async loading/cropping is in progress.
default: true, disable to provide custom progress bar UI. |
float |
snapRadius
An edge of the crop window will snap to the corresponding edge of a specified bounding box when
the crop window edge is less than or equal to this distance (in pixels) away from the bounding
box edge.
|
float |
touchRadius
The radius of the touchable area around the handle.
|
| Modifier | Constructor and Description |
|---|---|
|
CropImageOptions()
Init options with defaults.
|
protected |
CropImageOptions(android.os.Parcel in)
Create object from parcel.
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
void |
validate()
Validate all the options are withing valid range.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<CropImageOptions> CREATOR
public CropImageView.CropShape cropShape
public float snapRadius
public float touchRadius
public CropImageView.Guidelines guidelines
public CropImageView.ScaleType scaleType
public boolean showCropOverlay
public boolean showProgressBar
public boolean autoZoomEnabled
public boolean multiTouchEnabled
public int maxZoom
public float initialCropWindowPaddingRatio
public boolean fixAspectRatio
public int aspectRatioX
public int aspectRatioY
public float borderLineThickness
public int borderLineColor
public float borderCornerThickness
public float borderCornerOffset
public float borderCornerLength
public int borderCornerColor
public float guidelinesThickness
public int guidelinesColor
public int backgroundColor
public int minCropWindowWidth
public int minCropWindowHeight
public int minCropResultWidth
public int minCropResultHeight
public int maxCropResultWidth
public int maxCropResultHeight
public java.lang.CharSequence activityTitle
CropImageActivitypublic int activityMenuIconColor
public android.net.Uri outputUri
public android.graphics.Bitmap.CompressFormat outputCompressFormat
public int outputCompressQuality
public int outputRequestWidth
public int outputRequestHeight
public CropImageView.RequestSizeOptions outputRequestSizeOptions
public boolean noOutputImage
public android.graphics.Rect initialCropWindowRectangle
public int initialRotation
public boolean allowRotation
public boolean allowFlipping
public boolean allowCounterRotation
public int rotationDegrees
public boolean flipHorizontally
public boolean flipVertically
public java.lang.CharSequence cropMenuCropButtonTitle
public int cropMenuCropButtonIcon
public CropImageOptions()
protected CropImageOptions(android.os.Parcel in)
public void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int describeContents()
describeContents in interface android.os.Parcelablepublic void validate()
java.lang.IllegalArgumentException - if any of the options is not valid