Home  >  Forum  >  Android
Post New Query

Android avoid activity restart on orientation change



Asked on September 16, 2015
How to avoid activity restart on orientation change in Android




Replied on September 16, 2015
Use attribute  android:configChanges in <activity> tag in AndroidManifest.xml with orientation and other options. Find the sample example.

<activity  android:name=".MainActivity" 
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">



Replied on September 16, 2015
Thanks.

Write Answer




©2019 concretepage.com | Privacy Policy | Contact Us