Skip to content

Instantly share code, notes, and snippets.

@androidmads
Last active August 11, 2016 05:45
Show Gist options
  • Save androidmads/77f0541f175686335560a4dd5d6972c5 to your computer and use it in GitHub Desktop.
Save androidmads/77f0541f175686335560a4dd5d6972c5 to your computer and use it in GitHub Desktop.
Snippet to avoid restarting activity when Screen Orientation changes on android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.androidmads.avoidrestart">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
@androidmads
Copy link
Author

Snippet to avoid restarting activity when Screen Orientation changes on android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment