public void run() { ImageView imageView = getImageView(); if (null != imageView) { mSuppMatrix.postScale(mDeltaScale, mDeltaScale, mFocalX, mFocalY); checkAndDisplayMatrix(); final float currentScale = getScale(); if ((mDeltaScale > 1f && currentScale < mTargetZoom) || (mDeltaScale < 1f && mTargetZoom < currentScale)) { // We haven't hit our target scale yet, so post ourselves // again Compat.postOnAnimation(imageView, this); } else { // We've scaled past our target zoom, so calculate the // necessary scale so we're back at target zoom final float delta = mTargetZoom / currentScale; mSuppMatrix.postScale(delta, delta, mFocalX, mFocalY); checkAndDisplayMatrix(); } } } }
public void run() { ImageView imageView = getImageView(); if (null != imageView) { mSuppMatrix.postScale(mDeltaScale, mDeltaScale, mFocalX, mFocalY); checkAndDisplayMatrix(); final float currentScale = getScale(); if ((mDeltaScale > 1f && currentScale < mTargetZoom) || (mDeltaScale < 1f && mTargetZoom < currentScale)) { // We haven't hit our target scale yet, so post ourselves // again Compat.postOnAnimation(imageView, this); } else { // We've scaled past our target zoom, so calculate the // necessary scale so we're back at target zoom final float delta = mTargetZoom / currentScale; mSuppMatrix.postScale(delta, delta, mFocalX, mFocalY); checkAndDisplayMatrix(); } } } }
public void run() { ImageView imageView = getImageView(); if (null != imageView) { mSuppMatrix.postScale(mDeltaScale, mDeltaScale, mFocalX, mFocalY); checkAndDisplayMatrix(); final float currentScale = getScale(); if ((mDeltaScale > 1f && currentScale < mTargetZoom) || (mDeltaScale < 1f && mTargetZoom < currentScale)) { // We haven't hit our target scale yet, so post ourselves // again Compat.postOnAnimation(imageView, this); } else { // We've scaled past our target zoom, so calculate the // necessary scale so we're back at target zoom final float delta = mTargetZoom / currentScale; mSuppMatrix.postScale(delta, delta, mFocalX, mFocalY); checkAndDisplayMatrix(); } } } }
public void run() { ImageView imageView = getImageView(); if (null != imageView) { mSuppMatrix.postScale(mDeltaScale, mDeltaScale, mFocalX, mFocalY); checkAndDisplayMatrix(); final float currentScale = getScale(); if ((mDeltaScale > 1f && currentScale < mTargetZoom) || (mDeltaScale < 1f && mTargetZoom < currentScale)) { // We haven't hit our target scale yet, so post ourselves // again Compat.postOnAnimation(imageView, this); } else { // We've scaled past our target zoom, so calculate the // necessary scale so we're back at target zoom final float delta = mTargetZoom / currentScale; mSuppMatrix.postScale(delta, delta, mFocalX, mFocalY); checkAndDisplayMatrix(); } } } }
public void run() { ImageView imageView = getImageView(); if (null != imageView) { mSuppMatrix.postScale(mDeltaScale, mDeltaScale, mFocalX, mFocalY); checkAndDisplayMatrix(); final float currentScale = getScale(); if ((mDeltaScale > 1f && currentScale < mTargetZoom) || (mDeltaScale < 1f && mTargetZoom < currentScale)) { // We haven't hit our target scale yet, so post ourselves // again Compat.postOnAnimation(imageView, this); } else { // We've scaled past our target zoom, so calculate the // necessary scale so we're back at target zoom final float delta = mTargetZoom / currentScale; mSuppMatrix.postScale(delta, delta, mFocalX, mFocalY); checkAndDisplayMatrix(); } } } }
@Override public void run() { ImageView imageView = getImageView(); if (null != imageView && mScroller.computeScrollOffset()) { final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); if (DEBUG) { Log.d(LOG_TAG, "fling run(). CurrentX:" + mCurrentX + " CurrentY:" + mCurrentY + " NewX:" + newX + " NewY:" + newY); } mSuppMatrix.postTranslate(mCurrentX - newX, mCurrentY - newY); setImageViewMatrix(getDisplayMatrix()); mCurrentX = newX; mCurrentY = newY; // Post On animation Compat.postOnAnimation(imageView, this); } } }
@Override public void run() { ImageView imageView = getImageView(); if (null != imageView && mScroller.computeScrollOffset()) { final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); if (DEBUG) { Log.d(LOG_TAG, "fling run(). CurrentX:" + mCurrentX + " CurrentY:" + mCurrentY + " NewX:" + newX + " NewY:" + newY); } mSuppMatrix.postTranslate(mCurrentX - newX, mCurrentY - newY); setImageViewMatrix(getDisplayMatrix()); mCurrentX = newX; mCurrentY = newY; // Post On animation Compat.postOnAnimation(imageView, this); } } }
@Override public void run() { ImageView imageView = getImageView(); if (null != imageView && mScroller.computeScrollOffset()) { final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); if (DEBUG) { Log.d(LOG_TAG, "fling run(). CurrentX:" + mCurrentX + " CurrentY:" + mCurrentY + " NewX:" + newX + " NewY:" + newY); } mSuppMatrix.postTranslate(mCurrentX - newX, mCurrentY - newY); setImageViewMatrix(getDisplayMatrix()); mCurrentX = newX; mCurrentY = newY; // Post On animation Compat.postOnAnimation(imageView, this); } } }
@Override public void run() { ImageView imageView = getImageView(); if (null != imageView && mScroller.computeScrollOffset()) { final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); if (DEBUG) { Log.d(LOG_TAG, "fling run(). CurrentX:" + mCurrentX + " CurrentY:" + mCurrentY + " NewX:" + newX + " NewY:" + newY); } mSuppMatrix.postTranslate(mCurrentX - newX, mCurrentY - newY); setImageViewMatrix(getDisplayMatrix()); mCurrentX = newX; mCurrentY = newY; // Post On animation Compat.postOnAnimation(imageView, this); } } }
@Override public void run() { ImageView imageView = getImageView(); if (null != imageView && mScroller.computeScrollOffset()) { final int newX = mScroller.getCurrX(); final int newY = mScroller.getCurrY(); if (DEBUG) { Log.d(LOG_TAG, "fling run(). CurrentX:" + mCurrentX + " CurrentY:" + mCurrentY + " NewX:" + newX + " NewY:" + newY); } mSuppMatrix.postTranslate(mCurrentX - newX, mCurrentY - newY); setImageViewMatrix(getDisplayMatrix()); mCurrentX = newX; mCurrentY = newY; // Post On animation Compat.postOnAnimation(imageView, this); } } }