I am designing a application that uses the camera. I want it locked it landscape mode and just have the pictures(for example, a handle to change between camera and video) rotate. I don’t want to launch onCreate() again. This is so the camera/video logo does not appear sideways on the screen.
I have put this in the manifest:
android:screenOrientation="landscape"
This keeps the screen from turning. However, I can’t seem to figure out how I get the event that tells me when turn the images. I have seen camera apps do this.
Thanks!
If you’ve locked your activity using manifest, the only workable solution to track orientation I saw was using
OrientationEventListener.You’ll need to convert degrees to correct orientation yourself. But that is relatively easy task.