@Override public void onScaleEnd(ScaleGestureDetector detector){
  float scale=cellSize / initialCellSize;
  double f=Math.pow(ZOOM_STEP,Math.round(Math.log(scale) / Math.log(ZOOM_STEP)));
  scale=(float)(initialCellSize * f) / cellSize;
  cellSize*=scale;
  originX+=lastFocusX * scale - lastFocusX;
  originY+=lastFocusY * scale - lastFocusY;
  originX=Math.round(originX / cellSize) * cellSize;
  originY=Math.round(originY / cellSize) * cellSize;
  selection.setVisibility(INVISIBLE);
  sge.setState(originX,originY,cellSize);
  invalidate();
}

@ Override public void onScaleEnd ( ScaleGestureDetector detector ) { float scale = cellSize / initialCellSize ; double f = Math . pow ( ZOOM_STEP , Math . round ( Math . log ( scale ) / Math . log ( ZOOM_STEP ) ) ) ; scale = ( float ) ( initialCellSize * f ) / cellSize ; cellSize *= scale ; originX += lastFocusX * scale - lastFocusX ; originY += lastFocusY * scale - lastFocusY ; originX = Math . round ( originX / cellSize ) * cellSize ; originY = Math . round ( originY / cellSize ) * cellSize ; selection . setVisibility ( INVISIBLE ) ; sge . setState ( originX , originY , cellSize ) ; invalidate ( ) ; }
also called when a move gesture ends
