List of usage examples for android.widget ImageView removeCallbacks
public boolean removeCallbacks(Runnable action)
Removes the specified Runnable from the message queue.
From source file:com.ycl.framework.photoview.PhotoViewAttacher.java
@Override public void setScale(float scale, float focalX, float focalY, boolean animate) { ImageView imageView = getImageView(); if (null != imageView) { imageView.removeCallbacks(mRunColse); // Check to see if the scale is within bounds if (scale < mMinScale || scale > mMaxScale) { LogManager.getLogger().i(LOG_TAG, "Scale must be within the range of minScale and maxScale"); return; }/* w w w . j av a2s.c o m*/ if (animate) { imageView.post(new AnimatedZoomRunnable(getScale(), scale, focalX, focalY)); } else { mSuppMatrix.setScale(scale, scale, focalX, focalY); checkAndDisplayMatrix(); } } }