Code example for TranslateAnimation

Methods: setDuration, setStartTime

0
			} 
		} 
 
		postTranslate(deltaX, deltaY);
		if (animate) {
			Animation a = new TranslateAnimation(-deltaX, 0, -deltaY, 0);
			a.setStartTime(SystemClock.elapsedRealtime());
			a.setDuration(250);
			setAnimation(a);
		} 
		setImageMatrix(getImageViewMatrix()); 
	} 
 
	// Unchanged from ImageViewTouchBase 
	protected float getValue(Matrix matrix, int whichValue) {
		matrix.getValues(mMatrixValues);
		return mMatrixValues[whichValue];
	} 
 
	// Get the scale factor out of the matrix. 
	protected float getScale(Matrix matrix) {