Question

I snap a photo, and it gets placed onto an ImageView. When the user sees the page where the Image View is, and I turn the phone sideways where the orientation is horizontal, the app immediately returns to the app's main screen. Any ideas?

Was it helpful?

Solution

Rotating the phone recreates the activity. Implementing the onSaveInstanceState() and onCreate() methods to properly save and restore the state of the activity should fix the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top