Android Camera in Portrait on SurfaceView

前端 未结 6 2070
孤城傲影
孤城傲影 2020-12-01 09:06

I tried several things to try to get the camera preview to show up in portrait on a SurfaceView. Nothing worked. I am testing on a Droid that has 2.0.1. I tr

6条回答
  •  囚心锁ツ
    2020-12-01 09:36

    There is no need you have to set any parameters for the orientation until you need to do that explicitly. By Default, it supports this facility. In my case, i have a Activity and above that activity i have a camera view, so i didn't set any orientation for the camera properties, instead for the activity i set the orientation as portrait in the Manifest file. now the app looks and works good. Might be helpful for some one..

    Thanks.

提交回复
热议问题