public class PhotoViewAttacher
extends java.lang.Object
implements android.view.View.OnTouchListener, android.view.View.OnLayoutChangeListener
Constructor and Description |
---|
PhotoViewAttacher(android.widget.ImageView imageView) |
Modifier and Type | Method and Description |
---|---|
void |
getDisplayMatrix(android.graphics.Matrix matrix)
Get the display matrix
|
android.graphics.RectF |
getDisplayRect() |
android.graphics.Matrix |
getImageMatrix() |
float |
getMaximumScale() |
float |
getMediumScale() |
float |
getMinimumScale() |
float |
getScale() |
android.widget.ImageView.ScaleType |
getScaleType() |
void |
getSuppMatrix(android.graphics.Matrix matrix)
Get the current support matrix
|
boolean |
isZoomable() |
boolean |
isZoomEnabled()
Deprecated.
|
void |
onLayoutChange(android.view.View v,
int left,
int top,
int right,
int bottom,
int oldLeft,
int oldTop,
int oldRight,
int oldBottom) |
boolean |
onTouch(android.view.View v,
android.view.MotionEvent ev) |
void |
setAllowParentInterceptOnEdge(boolean allow) |
void |
setBaseRotation(float degrees) |
boolean |
setDisplayMatrix(android.graphics.Matrix finalMatrix) |
void |
setMaximumScale(float maximumScale) |
void |
setMediumScale(float mediumScale) |
void |
setMinimumScale(float minimumScale) |
void |
setOnClickListener(android.view.View.OnClickListener listener) |
void |
setOnDoubleTapListener(android.view.GestureDetector.OnDoubleTapListener newOnDoubleTapListener) |
void |
setOnLongClickListener(android.view.View.OnLongClickListener listener) |
void |
setOnMatrixChangeListener(OnMatrixChangedListener listener) |
void |
setOnOutsidePhotoTapListener(OnOutsidePhotoTapListener mOutsidePhotoTapListener) |
void |
setOnPhotoTapListener(OnPhotoTapListener listener) |
void |
setOnScaleChangeListener(OnScaleChangedListener onScaleChangeListener) |
void |
setOnSingleFlingListener(OnSingleFlingListener onSingleFlingListener) |
void |
setOnViewDragListener(OnViewDragListener listener) |
void |
setOnViewTapListener(OnViewTapListener listener) |
void |
setRotationBy(float degrees) |
void |
setRotationTo(float degrees) |
void |
setScale(float scale) |
void |
setScale(float scale,
boolean animate) |
void |
setScale(float scale,
float focalX,
float focalY,
boolean animate) |
void |
setScaleLevels(float minimumScale,
float mediumScale,
float maximumScale) |
void |
setScaleType(android.widget.ImageView.ScaleType scaleType) |
void |
setZoomable(boolean zoomable) |
void |
setZoomInterpolator(android.view.animation.Interpolator interpolator)
Set the zoom interpolator
|
void |
setZoomTransitionDuration(int milliseconds) |
void |
update() |
public void setOnDoubleTapListener(android.view.GestureDetector.OnDoubleTapListener newOnDoubleTapListener)
public void setOnScaleChangeListener(OnScaleChangedListener onScaleChangeListener)
public void setOnSingleFlingListener(OnSingleFlingListener onSingleFlingListener)
@Deprecated public boolean isZoomEnabled()
public android.graphics.RectF getDisplayRect()
public boolean setDisplayMatrix(android.graphics.Matrix finalMatrix)
public void setBaseRotation(float degrees)
public void setRotationTo(float degrees)
public void setRotationBy(float degrees)
public float getMinimumScale()
public float getMediumScale()
public float getMaximumScale()
public float getScale()
public android.widget.ImageView.ScaleType getScaleType()
public void onLayoutChange(android.view.View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
onLayoutChange
in interface android.view.View.OnLayoutChangeListener
public boolean onTouch(android.view.View v, android.view.MotionEvent ev)
onTouch
in interface android.view.View.OnTouchListener
public void setAllowParentInterceptOnEdge(boolean allow)
public void setMinimumScale(float minimumScale)
public void setMediumScale(float mediumScale)
public void setMaximumScale(float maximumScale)
public void setScaleLevels(float minimumScale, float mediumScale, float maximumScale)
public void setOnLongClickListener(android.view.View.OnLongClickListener listener)
public void setOnClickListener(android.view.View.OnClickListener listener)
public void setOnMatrixChangeListener(OnMatrixChangedListener listener)
public void setOnPhotoTapListener(OnPhotoTapListener listener)
public void setOnOutsidePhotoTapListener(OnOutsidePhotoTapListener mOutsidePhotoTapListener)
public void setOnViewTapListener(OnViewTapListener listener)
public void setOnViewDragListener(OnViewDragListener listener)
public void setScale(float scale)
public void setScale(float scale, boolean animate)
public void setScale(float scale, float focalX, float focalY, boolean animate)
public void setZoomInterpolator(android.view.animation.Interpolator interpolator)
interpolator
- the zoom interpolatorpublic void setScaleType(android.widget.ImageView.ScaleType scaleType)
public boolean isZoomable()
public void setZoomable(boolean zoomable)
public void update()
public void getDisplayMatrix(android.graphics.Matrix matrix)
matrix
- target matrix to copy topublic void getSuppMatrix(android.graphics.Matrix matrix)
public android.graphics.Matrix getImageMatrix()
public void setZoomTransitionDuration(int milliseconds)