Code example for Camera

Methods: getMatrixrestorerotateYsavetranslate

   * @param t transformation 
   * @param rotationAngle the Angle by which to rotate the Bitmap 
  private void transformImageBitmap(ImageView child, Transformation trans, int rotationAngle)
    final Matrix imageMatrix = trans.getMatrix();
    final int imageHeight = child.getLayoutParams().height;
    final int imageWidth = child.getLayoutParams().width;
    final int rotation = Math.abs(rotationAngle);
    mCamera.translate(0.0f, 0.0f, 100.0f);
    // As the angle of the view gets less, zoom in 
    if (rotation < MAX_ROTATION_ANGLE) {
      float zoomAmount = (float) (MAX_ZOOM + (rotation * 1.5));
      mCamera.translate(0.0f, 0.0f, zoomAmount);
    imageMatrix.preTranslate(-(imageWidth/2), -(imageHeight/2)); 
    imageMatrix.postTranslate((imageWidth/2), (imageHeight/2));
Stop searching for code, let great code find you!  Add Codota to your java IDE