2

We need our android app to support Android V2.3 through to V5. We are rendering a Surface view inside a LinearLayout. Our Activity is locked to portrait.

We would like to programmatically rotate the SurfaceView with the same effect as though it changed from Portrait to Landscape. The SurfaceView is dynamically created in code and added to the LinearLayout which is defined in the xml. We wish to keep other views the same, this is why we need to fix the Activity orientation. How do we go about this?

Cœur
  • 32,421
  • 21
  • 173
  • 232
tech74
  • 1,385
  • 13
  • 31

1 Answers1

0

EDIT

Wherever you use sthe camera, set the orientation to 90 degrees:

  mCamera = Camera.open();
  mCamera.setDisplayOrientation(90);
user2520215
  • 553
  • 5
  • 15