Skip to content

Instantly share code, notes, and snippets.

@jdewind
Created September 8, 2010 13:07
Show Gist options
  • Save jdewind/570108 to your computer and use it in GitHub Desktop.
Save jdewind/570108 to your computer and use it in GitHub Desktop.
if (state == MotionState.DRAGGING) {
bottomCaliperMatrix.set(bottomCaliperSavedMatrix);
float yoffset = motionEvent.getY() - startPoint.y;
bottomCaliperMatrix.postTranslate(0, yoffset);
float[] bottomMatrix = new float[9];
bottomCaliperMatrix.getValues(bottomMatrix);
float delta = Math.abs(Math.min(bottomMatrix[5] - 79, 0));
bottomCaliperMatrix.postTranslate(0, delta);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment