Reputation: 59
I am looking for a solution to keep the SCREEN ORIENTATION in auto mode, but that the preview of the camera does not rotate. Any suggestions?
Upvotes: 0
Views: 301
Reputation: 18107
Use rotation animation SEAMLESS, and implement landscape and portrait UIs that carefully place the preview window in the same place.
Upvotes: 0
Reputation: 1240
You need to mention android:screenOrientation="portrait"
or android:screenOrientation="landscape"
under the activity tag in your manifest file (i.e. AndroidManifest.xml) if you want to make your activity's orientation fixed (this is the activity in which the preview of camera is being shown by you).
Like for example -
<activity
android:name="com.something.camera.CaptureActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
Upvotes: 1