开发者

Is there a way I can prevent an app from going to the home screen when orientation is changed?

开发者 https://www.devze.com 2023-01-26 04:04 出处:网络
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 immediate开发者_Sta

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 immediate开发者_StackOverflow中文版ly returns to the app's main screen. Any ideas?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消