接口 IPhotoView

  • 所有已知实现类:
    EasePhotoView

    public interface IPhotoView
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      boolean canZoom()
      Returns true if the PhotoView is set to allow zooming of Photos.
      android.graphics.RectF getDisplayRect()
      Gets the Display Rectangle of the currently displayed Drawable.
      float getMaxScale()  
      float getMidScale()  
      float getMinScale()  
      float getScale()
      Returns the current scale value
      android.widget.ImageView.ScaleType getScaleType()
      Return the current scale type in use by the ImageView.
      void setAllowParentInterceptOnEdge​(boolean allow)
      Whether to allow the ImageView's parent to intercept the touch event when the photo is scroll to it's horizontal edge.
      void setMaxScale​(float maxScale)
      Sets the maximum scale level.
      void setMidScale​(float midScale)
      Sets the middle scale level.
      void setMinScale​(float minScale)
      Sets the minimum scale level.
      void setOnLongClickListener​(android.view.View.OnLongClickListener listener)
      Register a callback to be invoked when the Photo displayed by this view is long-pressed.
      void setOnMatrixChangeListener​(io.agora.chat.uikit.widget.photoview.PhotoViewAttacher.OnMatrixChangedListener listener)
      Register a callback to be invoked when the Matrix has changed for this View.
      void setOnPhotoTapListener​(OnPhotoTapListener listener)
      Register a callback to be invoked when the Photo displayed by this View is tapped with a single tap.
      void setOnViewTapListener​(OnViewTapListener listener)
      Register a callback to be invoked when the View is tapped with a single tap.
      void setScaleType​(android.widget.ImageView.ScaleType scaleType)
      Controls how the image should be resized or moved to match the size of the ImageView.
      void setZoomable​(boolean zoomable)
      Allows you to enable/disable the zoom functionality on the ImageView.
      void zoomTo​(float scale, float focalX, float focalY)
      Zooms to the specified scale, around the focal point given.
    • 方法详细资料

      • canZoom

        boolean canZoom()
        Returns true if the PhotoView is set to allow zooming of Photos.
        返回:
        true if the PhotoView allows zooming.
      • getDisplayRect

        android.graphics.RectF getDisplayRect()
        Gets the Display Rectangle of the currently displayed Drawable. The Rectangle is relative to this View and includes all scaling and translations.
        返回:
        - RectF of Displayed Drawable
      • getMinScale

        float getMinScale()
        返回:
        The current minimum scale level. What this value represents depends on the current ImageView.ScaleType.
      • getMidScale

        float getMidScale()
        返回:
        The current middle scale level. What this value represents depends on the current ImageView.ScaleType.
      • getMaxScale

        float getMaxScale()
        返回:
        The current maximum scale level. What this value represents depends on the current ImageView.ScaleType.
      • getScale

        float getScale()
        Returns the current scale value
        返回:
        float - current scale value
      • getScaleType

        android.widget.ImageView.ScaleType getScaleType()
        Return the current scale type in use by the ImageView.
      • setAllowParentInterceptOnEdge

        void setAllowParentInterceptOnEdge​(boolean allow)
        Whether to allow the ImageView's parent to intercept the touch event when the photo is scroll to it's horizontal edge.
      • setMinScale

        void setMinScale​(float minScale)
        Sets the minimum scale level. What this value represents depends on the current ImageView.ScaleType.
      • setMidScale

        void setMidScale​(float midScale)
        Sets the middle scale level. What this value represents depends on the current ImageView.ScaleType.
      • setMaxScale

        void setMaxScale​(float maxScale)
        Sets the maximum scale level. What this value represents depends on the current ImageView.ScaleType.
      • setOnLongClickListener

        void setOnLongClickListener​(android.view.View.OnLongClickListener listener)
        Register a callback to be invoked when the Photo displayed by this view is long-pressed.
        参数:
        listener - - Listener to be registered.
      • setOnMatrixChangeListener

        void setOnMatrixChangeListener​(io.agora.chat.uikit.widget.photoview.PhotoViewAttacher.OnMatrixChangedListener listener)
        Register a callback to be invoked when the Matrix has changed for this View. An example would be the user panning or scaling the Photo.
        参数:
        listener - - Listener to be registered.
      • setOnPhotoTapListener

        void setOnPhotoTapListener​(OnPhotoTapListener listener)
        Register a callback to be invoked when the Photo displayed by this View is tapped with a single tap.
        参数:
        listener - - Listener to be registered.
      • setOnViewTapListener

        void setOnViewTapListener​(OnViewTapListener listener)
        Register a callback to be invoked when the View is tapped with a single tap.
        参数:
        listener - - Listener to be registered.
      • setScaleType

        void setScaleType​(android.widget.ImageView.ScaleType scaleType)
        Controls how the image should be resized or moved to match the size of the ImageView. Any scaling or panning will happen within the confines of this ImageView.ScaleType.
        参数:
        scaleType - - The desired scaling mode.
      • setZoomable

        void setZoomable​(boolean zoomable)
        Allows you to enable/disable the zoom functionality on the ImageView. When disable the ImageView reverts to using the FIT_CENTER matrix.
        参数:
        zoomable - - Whether the zoom functionality is enabled.
      • zoomTo

        void zoomTo​(float scale,
                    float focalX,
                    float focalY)
        Zooms to the specified scale, around the focal point given.
        参数:
        scale - - Scale to zoom to
        focalX - - X Focus Point
        focalY - - Y Focus Point