开发者

Activity restart when the View Mode is changed

I need a little help in View modes. . After launching my Activity, when i press CTL+11 to change view mod开发者_StackOverflowe from Portrait to Landscape. all activites are called again and they are restarted. A few dialogs are shown again.

Similar behaviour is seen when i change from Landscape to Portrait.

What do i need to do that my main activity does not start again when i change the orientation.


just add following property in androidmenifest.xml under activity tag.... " android:configChanges="orientation" "


Yes, that is standard behavior in android.

If you don't want this behavior, do this in your manifest-file:

<activity android:name="YourActivity" android:configChanges="orientation|keyboard|keyboardHidden"/>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜