Package io.rong.imkit.picture.photoview

## Class PhotoView

- All Implemented Interfaces:

      public class PhotoView

  A zoomable ImageView. See PhotoViewAttacher for most of the details on how the zooming is accomplished

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public PhotoViewAttacher` | `attacher` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PhotoView(Context context)` |
    `PhotoView(Context context, AttributeSet attr)` |
    `PhotoView(Context context, AttributeSet attr, int defStyle)` |
    `PhotoView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)` |

  - ### Enum Constant Summary

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

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `PhotoViewAttacher` | `getAttacher()` | Get the current PhotoViewAttacher for this view.
    `ScaleType` | `getScaleType()` |
    `Matrix` | `getImageMatrix()` |
    `void` | `setOnLongClickListener(OnLongClickListener l)` |
    `void` | `setOnClickListener(OnClickListener l)` |
    `void` | `setScaleType(ScaleType scaleType)` |
    `void` | `setImageDrawable(Drawable drawable)` |
    `void` | `setImageResource(int resId)` |
    `void` | `setImageURI(Uri uri)` |
    `void` | `setRotationTo(float rotationDegree)` |
    `void` | `setRotationBy(float rotationDegree)` |
    `boolean` | `isZoomEnabled()` |
    `boolean` | `isZoomable()` |
    `void` | `setZoomable(boolean zoomable)` |
    `RectF` | `getDisplayRect()` |
    `void` | `getDisplayMatrix(Matrix matrix)` |
    `boolean` | `setDisplayMatrix(Matrix finalRectangle)` |
    `void` | `getSuppMatrix(Matrix matrix)` |
    `boolean` | `setSuppMatrix(Matrix matrix)` |
    `float` | `getMinimumScale()` |
    `float` | `getMediumScale()` |
    `float` | `getMaximumScale()` |
    `float` | `getScale()` |
    `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` | `setOnMatrixChangeListener(OnMatrixChangedListener listener)` |
    `void` | `setOnPhotoTapListener(OnPhotoTapListener listener)` |
    `void` | `setOnOutsidePhotoTapListener(OnOutsidePhotoTapListener listener)` |
    `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` | `setZoomTransitionDuration(int milliseconds)` |
    `void` | `setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener)` |
    `void` | `setOnScaleChangeListener(OnScaleChangedListener onScaleChangedListener)` |
    `void` | `setOnSingleFlingListener(OnSingleFlingListener onSingleFlingListener)` |

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

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

- - ### Constructor Detail

    - #### PhotoView

          PhotoView(Context context)

    - #### PhotoView

          PhotoView(Context context, AttributeSet attr)

    - #### PhotoView

          PhotoView(Context context, AttributeSet attr, int defStyle)

    - #### PhotoView

          PhotoView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

  - ### Method Detail

    - #### getAttacher

           PhotoViewAttacher getAttacher()

      Get the current PhotoViewAttacher for this view. Be wary of holding on to references to this attacher, as it has a reference to this view, which, if a reference is held in the wrong place, can cause memory leaks.

      Returns:

        the attacher.

    - #### getScaleType

           ScaleType getScaleType()

    - #### getImageMatrix

           Matrix getImageMatrix()

    - #### setOnLongClickListener

           void setOnLongClickListener(OnLongClickListener l)

    - #### setOnClickListener

           void setOnClickListener(OnClickListener l)

    - #### setScaleType

           void setScaleType(ScaleType scaleType)

    - #### setImageDrawable

           void setImageDrawable(Drawable drawable)

    - #### setImageResource

           void setImageResource(int resId)

    - #### setImageURI

           void setImageURI(Uri uri)

    - #### setRotationTo

           void setRotationTo(float rotationDegree)

    - #### setRotationBy

           void setRotationBy(float rotationDegree)

    - #### isZoomEnabled

          @Deprecated() boolean isZoomEnabled()

    - #### isZoomable

           boolean isZoomable()

    - #### setZoomable

           void setZoomable(boolean zoomable)

    - #### getDisplayRect

           RectF getDisplayRect()

    - #### getDisplayMatrix

           void getDisplayMatrix(Matrix matrix)

    - #### setDisplayMatrix

           boolean setDisplayMatrix(Matrix finalRectangle)

    - #### getSuppMatrix

           void getSuppMatrix(Matrix matrix)

    - #### setSuppMatrix

           boolean setSuppMatrix(Matrix matrix)

    - #### getMinimumScale

           float getMinimumScale()

    - #### getMediumScale

           float getMediumScale()

    - #### getMaximumScale

           float getMaximumScale()

    - #### getScale

           float getScale()

    - #### 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)

    - #### setOnMatrixChangeListener

           void setOnMatrixChangeListener(OnMatrixChangedListener listener)

    - #### setOnPhotoTapListener

           void setOnPhotoTapListener(OnPhotoTapListener listener)

    - #### setOnOutsidePhotoTapListener

           void setOnOutsidePhotoTapListener(OnOutsidePhotoTapListener listener)

    - #### 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)

    - #### setZoomTransitionDuration

           void setZoomTransitionDuration(int milliseconds)

    - #### setOnDoubleTapListener

           void setOnDoubleTapListener(OnDoubleTapListener onDoubleTapListener)

    - #### setOnScaleChangeListener

           void setOnScaleChangeListener(OnScaleChangedListener onScaleChangedListener)

    - #### setOnSingleFlingListener

           void setOnSingleFlingListener(OnSingleFlingListener onSingleFlingListener)