How to set framelayout to landscape, even if my activity is in portrait mode in android 2.3.1

I have activity when I open the camera. I use framelayout to preview the camera. but I have to open the camera in portrait mode, which creates a lot of problems, such as a small screen, rotation problem, can I adjust the frames in landscape orientation, even if my activity is in portrait mode

or if any idea for opening the camera effectively in portrait mode will be appreciated

Thank you in advance

+4
source share
2 answers

In API level 8 (v2.2), the camera contains the setDisplayOrientation method. Call this method using function 90 to rotate the camera display to portrait mode.

+3
source

Try changing the AndroidManifest.xml activity declaration:

<Activity android:screenOrientation="landscape" ... /> 
+1
source

Source: https://habr.com/ru/post/1345568/


All Articles