Code example for DecelerateInterpolator

Methods: getInterpolation

0
		float fraction = flingTime / INERTION;
		if (fraction >= 1) {
			return; 
		} 
 
		float interpolatedFraction = interpolator.getInterpolation(fraction);
 
		float curVX = ve.evaluate(interpolatedFraction, vx, 0);
		float curVY = ve.evaluate(interpolatedFraction, vy, 0);
		float dx = curVX * dt;
		float dy = curVY * dt;
		matrix.postTranslate(dx, dy);
		doInvalidate(); 
		h.sendEmptyMessage(MSG_FLING);
	} 
 
	@Override 
	public void setImageBitmap(Bitmap bm) {
		super.setImageBitmap(bm);
		bmWidth = bm.getWidth();
Stop searching for code, let great code find you!  Add Codota to your java IDE