I have implemented the Camera Preview just as it is in the ApiDemos application of Android. The thing is that I want my activity, where the Preview is shown to be locked to portrait. So I set screenOrientation to portrait in the manifest.
The 'getOptimalPreviewSize' method returns opposite values for the preview, meaning, when it's needed to return 480x720, the method returns 720x480, and I have small preview centered in my FrameLayout of the activity (which is not what I want, I want it to match the parent (yes, the layout is defined with "match_parent").
I tried:
- setDisplayOrientation(90);
- parameters.set("orientation", "portrait");
- parameters.set("rotation", "90");
Nothing seems to help.
Why can't I show Preview of the Camera in portrait mode? Locked.
Thanks