[mono-android] Handling Config Changes

Jonathan Pryor jonp at xamarin.com
Tue Jan 3 14:51:01 EST 2012


On Dec 30, 2011, at 8:45 AM, was wrote:
> I want to restart an activity when the user changes the screen orientation.

That is the default behavior, unless you set ActivityAttribute.ConfigurationChanges:

	[Activity(ConfigurationChanges=ConfigChanges.Orientation)]
	public class ManuallyHandleScreenRotation : Activity {
	}

If you want the activity to be re-created on screen rotation, DO NOT set ActivityAttribute.ConfigurationChanges.

 - Jon



More information about the Monodroid mailing list