I am using a Preview to display what the camera see's on the screen.
I can get everything working fine, surface created, surface set and the surface is displayed.
However it always displays the picture at an incorrect 90 degree angle in portrait mode.
Such as in the picture:
I am aware that using the following code will set the picture straight:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
However I have the Preview within an Activity that has other elements in it and it does not make sense for my Activity to be displayed in landscape mode. (Its disabled by default)
So I was wondering is there anyway to just change the orientation of the Preview? And leave the rest of my Activity correctly displayed in Portrait mode?
Or anyway to rotate the preview so that it is displayed correctly?