Activity keeps restarting when orientation changes
问题 how do you keep the activity from restarting when the screen rotates or when then user slides the keyboard on the phone? Is this possible? Is there a work around or something? All relevant answers are appreciated. 回答1: You can do this by declaring a specific attribute in your activity element in your manifest.xml . The element in question is called android:configChanges , and you need to register the string value of orientation . <activity android:name=".MyActivity" android:configChanges=