-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.accessibility.AccessibilityEventSource
public final class CropOverlayView extends View
A custom View representing the crop window and the shaded background outside the crop window.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCropOverlayView.Companionpublic interfaceCropOverlayView.CropWindowChangeListenerInterface definition for a callback to be invoked when crop window rectangle is changing.
-
Field Summary
Fields Modifier and Type Field Description private BooleanisFixAspectRatioprivate CropImageView.Guidelinesguidelinesprivate CropImageView.CropShapecropShapeprivate CropImageView.CropCornerShapecornerShapeprivate RectFcropWindowRectprivate IntegeraspectRatioXprivate IntegeraspectRatioYprivate RectinitialCropWindowRect
-
Constructor Summary
Constructors Constructor Description CropOverlayView(Context context, AttributeSet attrs)CropOverlayView(Context context)
-
Method Summary
Modifier and Type Method Description final BooleangetIsFixAspectRatio()Flag indicating if the crop area should always be a certain aspect ratio (indicated by mTargetAspectRatio). final UnitsetIsFixAspectRatio(Boolean isFixAspectRatio)final CropImageView.GuidelinesgetGuidelines()Instance variables for customizable attributes final UnitsetGuidelines(CropImageView.Guidelines guidelines)final CropImageView.CropShapegetCropShape()The shape of the cropping area - rectangle/circular. final UnitsetCropShape(CropImageView.CropShape cropShape)final CropImageView.CropCornerShapegetCornerShape()The shape of the crop corner final UnitsetCornerShape(CropImageView.CropCornerShape cornerShape)final RectFgetCropWindowRect()final UnitsetCropWindowRect(RectF cropWindowRect)final IntegergetAspectRatioX()final UnitsetAspectRatioX(Integer aspectRatioX)final IntegergetAspectRatioY()final UnitsetAspectRatioY(Integer aspectRatioY)final RectgetInitialCropWindowRect()final UnitsetInitialCropWindowRect(Rect initialCropWindowRect)final UnitsetCropWindowChangeListener(CropOverlayView.CropWindowChangeListener listener)Set the crop window change listener. final UnitfixCurrentCropWindowRect()Fix the current crop window rectangle if it is outside of cropping image or view bounds. final UnitsetBounds(FloatArray boundsPoints, Integer viewWidth, Integer viewHeight)Informs the CropOverlayView of the image's position relative to the ImageView. final UnitresetCropOverlayView()Resets the crop overlay view. final UnitsetCropShape(CropImageView.CropShape cropShape)The shape of the cropping area - rectangle/circular. final UnitsetCropCornerShape(CropImageView.CropCornerShape cropCornerShape)The shape of cropper corners (rectangle / oval) final UnitsetCropperTextLabelVisibility(Boolean isEnabled)Sets the cropper label if it is enabled final UnitsetCropLabelText(String textLabel)Sets the copy text for cropper text final UnitsetCropLabelTextSize(Float textSize)Sets the text size for cropper text final UnitsetCropLabelTextColor(Integer textColor)Sets the text color for cropper text final UnitsetGuidelines(CropImageView.Guidelines guidelines)Sets the guidelines for the CropOverlayView to be either on, off, or to show when resizing the application. final UnitsetFixedAspectRatio(Boolean fixAspectRatio)Sets whether the aspect ratio is fixed or not; true fixes the aspect ratio, while false allows it to be changed. final UnitsetSnapRadius(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. final UnitsetCropCornerRadius(Float cornerRadius)Radius of the circular crop corner Default radius is 10 final BooleansetMultiTouchEnabled(Boolean multiTouchEnabled)Set multi touch functionality to enabled/disabled. final BooleansetCenterMoveEnabled(Boolean centerMoveEnabled)Set movement of the crop window by dragging the center to enabled/disabled. final UnitsetMinCropResultSize(Integer minCropResultWidth, Integer minCropResultHeight)the min size the resulting cropping image is allowed to be, affects the cropping window limits (in pixels). final UnitsetMaxCropResultSize(Integer maxCropResultWidth, Integer maxCropResultHeight)the max size the resulting cropping image is allowed to be, affects the cropping window limits (in pixels). final UnitsetCropWindowLimits(Float maxWidth, Float maxHeight, Float scaleFactorWidth, Float scaleFactorHeight)set the max width/height and scale factor of the shown image to original image to scale the limits appropriately. final UnitresetCropWindowRect()Reset crop window to initial rectangle. final UnitsetInitialAttributeValues(CropImageOptions options)Sets all initial values, but does not call initCropWindow to reset the views. BooleanonTouchEvent(MotionEvent event)-
Methods inherited from class com.canhub.cropper.CropOverlayView
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, addTouchables, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearFocus, clearViewTranslationCallback, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerCaptureChanged, dispatchPopulateAccessibilityEvent, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableHotspotChanged, drawableStateChanged, findFocus, findOnBackInvokedDispatcher, findViewById, findViewWithTag, findViewsWithText, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, gatherTransparentRegion, generateDisplayHash, getAccessibilityClassName, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasTransientState, hasWindowFocus, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, jumpDrawablesToCurrentState, keyboardNavigationClusterSearch, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onAttachedToWindow, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDetachedFromWindow, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollCaptureSearch, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, restoreDefaultFocus, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setWindowInsetsAnimationCallback, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CropOverlayView
CropOverlayView(Context context, AttributeSet attrs)
-
CropOverlayView
CropOverlayView(Context context)
-
-
Method Detail
-
getIsFixAspectRatio
final Boolean getIsFixAspectRatio()
Flag indicating if the crop area should always be a certain aspect ratio (indicated by mTargetAspectRatio).
-
setIsFixAspectRatio
final Unit setIsFixAspectRatio(Boolean isFixAspectRatio)
-
getGuidelines
final CropImageView.Guidelines getGuidelines()
Instance variables for customizable attributes
-
setGuidelines
final Unit setGuidelines(CropImageView.Guidelines guidelines)
-
getCropShape
final CropImageView.CropShape getCropShape()
The shape of the cropping area - rectangle/circular.
-
setCropShape
final Unit setCropShape(CropImageView.CropShape cropShape)
-
getCornerShape
final CropImageView.CropCornerShape getCornerShape()
The shape of the crop corner
-
setCornerShape
final Unit setCornerShape(CropImageView.CropCornerShape cornerShape)
-
getCropWindowRect
final RectF getCropWindowRect()
-
setCropWindowRect
final Unit setCropWindowRect(RectF cropWindowRect)
-
getAspectRatioX
final Integer getAspectRatioX()
-
setAspectRatioX
final Unit setAspectRatioX(Integer aspectRatioX)
-
getAspectRatioY
final Integer getAspectRatioY()
-
setAspectRatioY
final Unit setAspectRatioY(Integer aspectRatioY)
-
getInitialCropWindowRect
final Rect getInitialCropWindowRect()
-
setInitialCropWindowRect
final Unit setInitialCropWindowRect(Rect initialCropWindowRect)
-
setCropWindowChangeListener
final Unit setCropWindowChangeListener(CropOverlayView.CropWindowChangeListener listener)
Set the crop window change listener.
-
fixCurrentCropWindowRect
final Unit fixCurrentCropWindowRect()
Fix the current crop window rectangle if it is outside of cropping image or view bounds.
-
setBounds
final Unit setBounds(FloatArray boundsPoints, Integer viewWidth, Integer viewHeight)
Informs the CropOverlayView of the image's position relative to the ImageView. This is necessary to call in order to draw the crop window.
- Parameters:
boundsPoints- the image's bounding pointsviewWidth- The bounding image view width.viewHeight- The bounding image view height.
-
resetCropOverlayView
final Unit resetCropOverlayView()
Resets the crop overlay view.
-
setCropShape
final Unit setCropShape(CropImageView.CropShape cropShape)
The shape of the cropping area - rectangle/circular.
-
setCropCornerShape
final Unit setCropCornerShape(CropImageView.CropCornerShape cropCornerShape)
The shape of cropper corners (rectangle / oval)
-
setCropperTextLabelVisibility
final Unit setCropperTextLabelVisibility(Boolean isEnabled)
Sets the cropper label if it is enabled
-
setCropLabelText
final Unit setCropLabelText(String textLabel)
Sets the copy text for cropper text
-
setCropLabelTextSize
final Unit setCropLabelTextSize(Float textSize)
Sets the text size for cropper text
-
setCropLabelTextColor
final Unit setCropLabelTextColor(Integer textColor)
Sets the text color for cropper text
-
setGuidelines
final Unit setGuidelines(CropImageView.Guidelines guidelines)
Sets the guidelines for the CropOverlayView to be either on, off, or to show when resizing the application.
-
setFixedAspectRatio
final Unit setFixedAspectRatio(Boolean fixAspectRatio)
Sets whether the aspect ratio is fixed or not; true fixes the aspect ratio, while false allows it to be changed.
-
setSnapRadius
final Unit setSnapRadius(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. (default: 3)
-
setCropCornerRadius
final Unit setCropCornerRadius(Float cornerRadius)
Radius of the circular crop corner Default radius is 10
-
setMultiTouchEnabled
final Boolean setMultiTouchEnabled(Boolean multiTouchEnabled)
Set multi touch functionality to enabled/disabled.
-
setCenterMoveEnabled
final Boolean setCenterMoveEnabled(Boolean centerMoveEnabled)
Set movement of the crop window by dragging the center to enabled/disabled.
-
setMinCropResultSize
final Unit setMinCropResultSize(Integer minCropResultWidth, Integer minCropResultHeight)
the min size the resulting cropping image is allowed to be, affects the cropping window limits (in pixels).<br></br>
-
setMaxCropResultSize
final Unit setMaxCropResultSize(Integer maxCropResultWidth, Integer maxCropResultHeight)
the max size the resulting cropping image is allowed to be, affects the cropping window limits (in pixels).<br></br>
-
setCropWindowLimits
final Unit setCropWindowLimits(Float maxWidth, Float maxHeight, Float scaleFactorWidth, Float scaleFactorHeight)
set the max width/height and scale factor of the shown image to original image to scale the limits appropriately.
-
resetCropWindowRect
final Unit resetCropWindowRect()
Reset crop window to initial rectangle.
-
setInitialAttributeValues
final Unit setInitialAttributeValues(CropImageOptions options)
Sets all initial values, but does not call initCropWindow to reset the views.<br></br> Used once at the very start to initialize the attributes.
-
onTouchEvent
Boolean onTouchEvent(MotionEvent event)
-
-
-
-