As of API lvl 8, this is available:
public final void setDisplayOrientation (int degrees)
i.e. with portait in the manifest:
public void surfaceCreated(SurfaceHolder holder) {
mCamera = Camera.open();
mCamera.setDisplayOrientation(90);
More Related Contents:
- How to load an ImageView by URL in Android? [closed]
- JSONException: Value of type java.lang.String cannot be converted to JSONObject
- How to grant MODIFY_PHONE_STATE permission for apps ran on Gingerbread
- Crop image in android
- Not able to start Genymotion device
- Android AsyncTask threads limits?
- Change Activity’s theme programmatically
- Android – drawable with rounded corners at the top only
- How to programmatically force bluetooth low energy service discovery on Android without using cache
- stop service in android
- Theme/Style is not applied when inflater used with ApplicationContext
- Align text around ImageSpan center vertical
- How to get the current location in Google Maps Android API v2?
- Unable to import Eclipse project to Android Studio
- Getting “debuggable” value of androidManifest from code?
- Why is the Android test runner reporting “Empty test suite”?
- Need to disable expand on CollapsingToolbarLayout for certain fragments
- How to disable the Recent Tasks/Apps button
- Detect 7 inch and 10 inch tablet programmatically
- Hide Notification bar
- Android WebView inside ScrollView scrolls only scrollview
- How can I edit the text files in assets folder in Android?
- Android: Why does long click also trigger a normal click?
- ANDROID: How do I download a video file to SD card?
- Can’t grab progress on http POST file upload (Android)
- How to disable scrolling of AppBarLayout in CoordinatorLayout?
- Disable Scrolling in child Recyclerview android
- How to view SQL database in Eclipse Debug mode for android
- Android Alert dialog from inside an intent service
- Display toolbar for Google Maps marker automatically