public interface IPhotoView
| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_MAX_SCALE |
static float |
DEFAULT_MID_SCALE |
static float |
DEFAULT_MIN_SCALE |
static int |
DEFAULT_ZOOM_DURATION |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canZoom()
Returns true if the PhotoView is set to allow zooming of Photos.
|
void |
getDisplayMatrix(android.graphics.Matrix matrix)
Copies the Display Matrix of the currently displayed Drawable.
|
android.graphics.RectF |
getDisplayRect()
Gets the Display Rectangle of the currently displayed Drawable.
|
IPhotoView |
getIPhotoViewImplementation()
Will return instance of IPhotoView (eg.
|
float |
getMaximumScale() |
float |
getMediumScale() |
float |
getMinimumScale() |
float |
getScale()
Returns the current scale value
|
android.widget.ImageView.ScaleType |
getScaleType()
Return the current scale type in use by the ImageView.
|
android.graphics.Bitmap |
getVisibleRectangleBitmap()
Extracts currently visible area to Bitmap object, if there is no image loaded yet or the
ImageView is already destroyed, returns
null |
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.
|
boolean |
setDisplayMatrix(android.graphics.Matrix finalMatrix)
Sets the Display Matrix of the currently displayed Drawable.
|
void |
setMaximumScale(float maximumScale)
Sets the maximum scale level.
|
void |
setMediumScale(float mediumScale)
Sets the medium scale level.
|
void |
setMinimumScale(float minimumScale)
Sets the minimum scale level.
|
void |
setOnDoubleTapListener(android.view.GestureDetector.OnDoubleTapListener newOnDoubleTapListener)
Sets custom double tap listener, to intercept default given functions.
|
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(PhotoViewAttacher.OnMatrixChangedListener listener)
Register a callback to be invoked when the Matrix has changed for this View.
|
void |
setOnPhotoTapListener(PhotoViewAttacher.OnPhotoTapListener listener)
Register a callback to be invoked when the Photo displayed by this View is tapped with a
single tap.
|
void |
setOnScaleChangeListener(PhotoViewAttacher.OnScaleChangeListener onScaleChangeListener)
Will report back about scale changes
|
void |
setOnSingleFlingListener(PhotoViewAttacher.OnSingleFlingListener onSingleFlingListener)
Will report back about fling(single touch)
|
void |
setOnViewTapListener(PhotoViewAttacher.OnViewTapListener listener)
Register a callback to be invoked when the View is tapped with a single tap.
|
void |
setRotationBy(float rotationDegree)
Enables rotation via PhotoView internal functions.
|
void |
setRotationTo(float rotationDegree)
Enables rotation via PhotoView internal functions.
|
void |
setScale(float scale)
Changes the current scale to the specified value.
|
void |
setScale(float scale,
boolean animate)
Changes the current scale to the specified value.
|
void |
setScale(float scale,
float focalX,
float focalY,
boolean animate)
Changes the current scale to the specified value, around the given focal point.
|
void |
setScaleLevels(float minimumScale,
float mediumScale,
float maximumScale)
Allows to set all three scale levels at once, so you don't run into problem with setting
medium/minimum scale before the maximum one
|
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 |
setZoomTransitionDuration(int milliseconds)
Allows to change zoom transition speed, default value is 200 (PhotoViewAttacher.DEFAULT_ZOOM_DURATION).
|
static final float DEFAULT_MAX_SCALE
static final float DEFAULT_MID_SCALE
static final float DEFAULT_MIN_SCALE
static final int DEFAULT_ZOOM_DURATION
boolean canZoom()
android.graphics.RectF getDisplayRect()
boolean setDisplayMatrix(android.graphics.Matrix finalMatrix)
finalMatrix - target matrix to set PhotoView tovoid getDisplayMatrix(android.graphics.Matrix matrix)
matrix - target matrix to copy tofloat getMinimumScale()
ImageView.ScaleType.float getMediumScale()
ImageView.ScaleType.float getMaximumScale()
ImageView.ScaleType.float getScale()
android.widget.ImageView.ScaleType getScaleType()
void setAllowParentInterceptOnEdge(boolean allow)
allow - whether to allow intercepting by parent element or notvoid setMinimumScale(float minimumScale)
ImageView.ScaleType.minimumScale - minimum allowed scalevoid setMediumScale(float mediumScale)
ImageView.ScaleType.mediumScale - medium scale presetvoid setMaximumScale(float maximumScale)
ImageView.ScaleType.maximumScale - maximum allowed scale presetvoid setScaleLevels(float minimumScale,
float mediumScale,
float maximumScale)
minimumScale - minimum allowed scalemediumScale - medium allowed scalemaximumScale - maximum allowed scale presetvoid setOnLongClickListener(android.view.View.OnLongClickListener listener)
listener - - Listener to be registered.void setOnMatrixChangeListener(PhotoViewAttacher.OnMatrixChangedListener listener)
listener - - Listener to be registered.void setOnPhotoTapListener(PhotoViewAttacher.OnPhotoTapListener listener)
listener - - Listener to be registered.void setOnViewTapListener(PhotoViewAttacher.OnViewTapListener listener)
listener - - Listener to be registered.void setRotationTo(float rotationDegree)
rotationDegree - - Degree to rotate PhotoView to, should be in range 0 to 360void setRotationBy(float rotationDegree)
rotationDegree - - Degree to rotate PhotoView by, should be in range 0 to 360void setScale(float scale)
scale - - Value to scale tovoid setScale(float scale,
boolean animate)
scale - - Value to scale toanimate - - Whether to animate the scalevoid setScale(float scale,
float focalX,
float focalY,
boolean animate)
scale - - Value to scale tofocalX - - X Focus PointfocalY - - Y Focus Pointanimate - - Whether to animate the scalevoid setScaleType(android.widget.ImageView.ScaleType scaleType)
ImageView.ScaleType.scaleType - - The desired scaling mode.void setZoomable(boolean zoomable)
zoomable - - Whether the zoom functionality is enabled.android.graphics.Bitmap getVisibleRectangleBitmap()
nullvoid setZoomTransitionDuration(int milliseconds)
milliseconds - duration of zoom interpolationIPhotoView getIPhotoViewImplementation()
void setOnDoubleTapListener(android.view.GestureDetector.OnDoubleTapListener newOnDoubleTapListener)
newOnDoubleTapListener - custom OnDoubleTapListener to be set on ImageViewvoid setOnScaleChangeListener(PhotoViewAttacher.OnScaleChangeListener onScaleChangeListener)
onScaleChangeListener - OnScaleChangeListener instancevoid setOnSingleFlingListener(PhotoViewAttacher.OnSingleFlingListener onSingleFlingListener)
onSingleFlingListener - OnSingleFlingListener instance