When you display the bitmap, you may use scale attributes in imageView
android:scaleX="-1" //To flip horizontally or
android:scaleY="-1" //To flip verticallyenter code here
You may also want to look into this post and this tutorial
Update 1:
You can flip the image in preview in a similar manner. You could also create a helper function to flip the bitmap and then set it to the imageView.
Helper function to flip the image could be found here. For your code you may just need the following:
public static Bitmap flip(Bitmap src, int type) {
// create new matrix for transformation
Matrix matrix = new Matrix();
matrix.preScale(-1.0f, 1.0f);
// return transformed image
return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix, true);
}
and then in your previewCaptureImage method, instead of this imgPreview.setImageBitmap(bitmap);
, use the flip method and then set it to imageView like this
imgPreview.setImageBitmap(flip(bitmap));