I defined my activity to only be in portrait mode by :
android:screenOrientation=”portrait”
When I take a picture with the camera function via intent, take this picture in landscape mode and turn the screen to portrait mode when saving it, i return to my activity again. What I dont understand is, that my activity for a short time is in landscape mode, is destroyed and then built again in portrait mode… as my onCreate ond onRestore functions need some time, the waiting time for the user is doubled…
Is there a workaround or something else?
You can also register your activity to explicitly handle any orientation changes by adding
android:configChanges="orientation"to the activity definition and then overriding the onCofigurationChanged method in your activity like this:I’m not sure if it would help with your specific problem, but I remember doing this when I wanted an activity to only display in portrait mode. Let me know if it helps 🙂