See android.hardware.Camera.setDisplayOrientation (int degrees)

This is the approved way to set the camera orientation as of V2.2.
Please note that this only works for still images, videos will still
record in landscape orientation.

On Jul 15, 5:00 am, Vincent <y.ikeda.asa...@gmail.com> wrote:
> Hi,
>
> In my camera application, I use the following code to change the
> screen orientation.
>
> Parameters params = mCamera.getParameters();
> params.set("orientation", "portrait");
>
> It worked for the most of devices.
> However, after updating my NexusOne to 2.2, the above code does not
> work!!
> Is there any other way to change the orientation?
>
> The only way to change the orientation is to change the orientation of
> an Activity.
> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
> But, I don't want to do this because I have other controls like Text
> or Button on Screen.
>
> If somebody knows the solution for this, please help me!!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to