接口 IPhotoView
-
- 所有已知实现类:
EasePhotoView
public interface IPhotoView
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleancanZoom()Returns true if the PhotoView is set to allow zooming of Photos.android.graphics.RectFgetDisplayRect()Gets the Display Rectangle of the currently displayed Drawable.floatgetMaxScale()floatgetMidScale()floatgetMinScale()floatgetScale()Returns the current scale valueandroid.widget.ImageView.ScaleTypegetScaleType()Return the current scale type in use by the ImageView.voidsetAllowParentInterceptOnEdge(boolean allow)Whether to allow the ImageView's parent to intercept the touch event when the photo is scroll to it's horizontal edge.voidsetMaxScale(float maxScale)Sets the maximum scale level.voidsetMidScale(float midScale)Sets the middle scale level.voidsetMinScale(float minScale)Sets the minimum scale level.voidsetOnLongClickListener(android.view.View.OnLongClickListener listener)Register a callback to be invoked when the Photo displayed by this view is long-pressed.voidsetOnMatrixChangeListener(io.agora.chat.uikit.widget.photoview.PhotoViewAttacher.OnMatrixChangedListener listener)Register a callback to be invoked when the Matrix has changed for this View.voidsetOnPhotoTapListener(OnPhotoTapListener listener)Register a callback to be invoked when the Photo displayed by this View is tapped with a single tap.voidsetOnViewTapListener(OnViewTapListener listener)Register a callback to be invoked when the View is tapped with a single tap.voidsetScaleType(android.widget.ImageView.ScaleType scaleType)Controls how the image should be resized or moved to match the size of the ImageView.voidsetZoomable(boolean zoomable)Allows you to enable/disable the zoom functionality on the ImageView.voidzoomTo(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 currentImageView.ScaleType.
-
setMidScale
void setMidScale(float midScale)
Sets the middle scale level. What this value represents depends on the currentImageView.ScaleType.
-
setMaxScale
void setMaxScale(float maxScale)
Sets the maximum scale level. What this value represents depends on the currentImageView.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 thisImageView.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 tofocalX- - X Focus PointfocalY- - Y Focus Point
-
-