Android camera rotate

前端 未结 6 731
鱼传尺愫
鱼传尺愫 2020-11-30 06:04

I have a Motorola Defy OS Android 2.1 and I make an application with camera Preview. The problem is that the camera works fine on Samsung Galaxy S with Android 2.1, but on M

6条回答
  •  孤街浪徒
    2020-11-30 06:41

    I think that you can not make any setting to support the API 2.2 to 2.1. The API doesn't have in your current device lib. You must change to 2.2 to support API level 8. By the way, I also try to use the API level 7:

    Parameters parameters = camera.getParameters();
    parameters.setRotation(90);
    

    This function works well on the Samsung Galaxy Tab but Nexus one. The Samsung Galaxy Tab uses OS 2.2.0 and the Nexus one uses OS 2.2.1. When I try to use API level 8:

    camera.setDisplayOrientation(90);
    

    both of them work well. So I think that the API level 7 has problem when we use on Android OS 2.2.1.

提交回复
热议问题