How to Stop Activity Restart on Rotation in Android
http://www.viralandroid.com/2015/12/how-to-stop-activity-restart-on-rotation-in-android.html
In this simple tip, I am going to show how to stop activity restart when rotating/changing orientation in android device and emulator. By default in android while rotating the screen, the activity gets automatically restarted. So, following example shows you how to prevent/solved it.
Related:
How to Make Android TextView Text Selectable
How to Use Font Awesome Icons in Android Application
How to Increase the Integer Value When Screen is Touched
To stop restarting android activity you have to add a line in AndroidManifest.xml file of android project.
android:configChanges="keyboardHidden|orientation"
Now, run your Stop Activity Restart on Rotation application and type any word in edit box and rotate your device screen.
Related:
How to Make Android TextView Text Selectable
How to Use Font Awesome Icons in Android Application
How to Increase the Integer Value When Screen is Touched
To stop restarting android activity you have to add a line in AndroidManifest.xml file of android project.
android:configChanges="keyboardHidden|orientation"
Android Example: How to Stop Activity Restart on Rotation
XML Layout File
res/layout/stop_restart_activity_when_rotate.xmlJava Activity File
src/StopRestartActivityWhenRotate.javaAndroidManifest.xml File
src/main/AndroidMainfest.xmlNow, run your Stop Activity Restart on Rotation application and type any word in edit box and rotate your device screen.