Screen Orientation Change
How to properly handle screen orientatio开发者_运维技巧n change in android? Whenever i change the orientation of my phone or whenever I rotate my phone, my activity crashes and will force close.
Activity restarts when the orientation changes.
If you want to avoid orientation changes , then disable it using
android:screenOrientation="portrait" (or landscape) in the manifest.
check here,
http://developer.android.com/guide/topics/resources/runtime-changes.html
Handling configuration changes yourself.
精彩评论