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"/>
精彩评论