开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜