Rotating a Camera SurfaceView to portrait

前端 未结 7 1024
日久生厌
日久生厌 2020-12-14 04:37

I have looked up a few posts on changing the orientation of the camera with a surface view, but I have taken my code from the examples at:

http://developer.android.c

7条回答
  •  太阳男子
    2020-12-14 04:58

    I solved this issue by adding:

    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    

    To the onCreate event.

提交回复
热议问题