Package io.rong.imkit.picture.photoview

## Class PhotoViewAttacher

- All Implemented Interfaces:

      public class PhotoViewAttacher

  The component of PhotoView which does the work allowing for zooming, scaling, panning, etc. It is made public in case you need to subclass something other than ImageView and still gain the functionality that PhotoView offers

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PhotoViewAttacher(ImageView imageView)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `setOnDoubleTapListener(OnDoubleTapListener newOnDoubleTapListener)` |
    `void` | `setOnScaleChangeListener(OnScaleChangedListener onScaleChangeListener)` |
    `void` | `setOnSingleFlingListener(OnSingleFlingListener onSingleFlingListener)` |
    `boolean` | `isZoomEnabled()` |
    `RectF` | `getDisplayRect()` |
    `boolean` | `setDisplayMatrix(Matrix finalMatrix)` |
    `void` | `setBaseRotation(float degrees)` |
    `void` | `setRotationTo(float degrees)` |
    `void` | `setRotationBy(float degrees)` |
    `float` | `getMinimumScale()` |
    `float` | `getMediumScale()` |
    `float` | `getMaximumScale()` |
    `float` | `getScale()` |
    `ScaleType` | `getScaleType()` |
    `void` | `onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)` |
    `boolean` | `onTouch(View v, MotionEvent ev)` |
    `void` | `setAllowParentInterceptOnEdge(boolean allow)` |
    `void` | `setMinimumScale(float minimumScale)` |
    `void` | `setMediumScale(float mediumScale)` |
    `void` | `setMaximumScale(float maximumScale)` |
    `void` | `setScaleLevels(float minimumScale, float mediumScale, float maximumScale)` |
    `void` | `setOnLongClickListener(OnLongClickListener listener)` |
    `void` | `setOnClickListener(OnClickListener listener)` |
    `void` | `setOnMatrixChangeListener(OnMatrixChangedListener listener)` |
    `void` | `setOnPhotoTapListener(OnPhotoTapListener listener)` |
    `void` | `setOnOutsidePhotoTapListener(OnOutsidePhotoTapListener mOutsidePhotoTapListener)` |
    `void` | `setOnViewTapListener(OnViewTapListener listener)` |
    `void` | `setOnViewDragListener(OnViewDragListener listener)` |
    `void` | `setScale(float scale)` |
    `void` | `setScale(float scale, boolean animate)` |
    `void` | `setScale(float scale, float focalX, float focalY, boolean animate)` |
    `void` | `setZoomInterpolator(Interpolator interpolator)` | Set the zoom interpolator
    `void` | `setScaleType(ScaleType scaleType)` |
    `boolean` | `isZoomable()` |
    `void` | `setZoomable(boolean zoomable)` |
    `void` | `update()` |
    `void` | `getDisplayMatrix(Matrix matrix)` | Get the display matrix
    `void` | `getSuppMatrix(Matrix matrix)` | Get the current support matrix
    `Matrix` | `getImageMatrix()` |
    `void` | `setZoomTransitionDuration(int milliseconds)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PhotoViewAttacher

          PhotoViewAttacher(ImageView imageView)

  - ### Method Detail

    - #### setOnDoubleTapListener

           void setOnDoubleTapListener(OnDoubleTapListener newOnDoubleTapListener)

    - #### setOnScaleChangeListener

           void setOnScaleChangeListener(OnScaleChangedListener onScaleChangeListener)

    - #### setOnSingleFlingListener

           void setOnSingleFlingListener(OnSingleFlingListener onSingleFlingListener)

    - #### isZoomEnabled

          @Deprecated() boolean isZoomEnabled()

    - #### getDisplayRect

           RectF getDisplayRect()

    - #### setDisplayMatrix

           boolean setDisplayMatrix(Matrix finalMatrix)

    - #### setBaseRotation

           void setBaseRotation(float degrees)

    - #### setRotationTo

           void setRotationTo(float degrees)

    - #### setRotationBy

           void setRotationBy(float degrees)

    - #### getMinimumScale

           float getMinimumScale()

    - #### getMediumScale

           float getMediumScale()

    - #### getMaximumScale

           float getMaximumScale()

    - #### getScale

           float getScale()

    - #### getScaleType

           ScaleType getScaleType()

    - #### onLayoutChange

           void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)

    - #### onTouch

           boolean onTouch(View v, MotionEvent ev)

    - #### setAllowParentInterceptOnEdge

           void setAllowParentInterceptOnEdge(boolean allow)

    - #### setMinimumScale

           void setMinimumScale(float minimumScale)

    - #### setMediumScale

           void setMediumScale(float mediumScale)

    - #### setMaximumScale

           void setMaximumScale(float maximumScale)

    - #### setScaleLevels

           void setScaleLevels(float minimumScale, float mediumScale, float maximumScale)

    - #### setOnLongClickListener

           void setOnLongClickListener(OnLongClickListener listener)

    - #### setOnClickListener

           void setOnClickListener(OnClickListener listener)

    - #### setOnMatrixChangeListener

           void setOnMatrixChangeListener(OnMatrixChangedListener listener)

    - #### setOnPhotoTapListener

           void setOnPhotoTapListener(OnPhotoTapListener listener)

    - #### setOnOutsidePhotoTapListener

           void setOnOutsidePhotoTapListener(OnOutsidePhotoTapListener mOutsidePhotoTapListener)

    - #### setOnViewTapListener

           void setOnViewTapListener(OnViewTapListener listener)

    - #### setOnViewDragListener

           void setOnViewDragListener(OnViewDragListener listener)

    - #### setScale

           void setScale(float scale)

    - #### setScale

           void setScale(float scale, boolean animate)

    - #### setScale

           void setScale(float scale, float focalX, float focalY, boolean animate)

    - #### setZoomInterpolator

           void setZoomInterpolator(Interpolator interpolator)

      Set the zoom interpolator

      Parameters:
        `interpolator` - the zoom interpolator

    - #### setScaleType

           void setScaleType(ScaleType scaleType)

    - #### isZoomable

           boolean isZoomable()

    - #### setZoomable

           void setZoomable(boolean zoomable)

    - #### update

           void update()

    - #### getDisplayMatrix

           void getDisplayMatrix(Matrix matrix)

      Get the display matrix

      Parameters:
        `matrix` - target matrix to copy to

    - #### getSuppMatrix

           void getSuppMatrix(Matrix matrix)

      Get the current support matrix

    - #### getImageMatrix

           Matrix getImageMatrix()

    - #### setZoomTransitionDuration

           void setZoomTransitionDuration(int milliseconds)