Android Layout. How can I set Orientation Fixed for all activities in application Tag of AndroidMainfest.xml ? I don\'t want to set orientation for each activity individuall
(Monodroid/C# code)
You can create an abstract base class
public abstract class ActBase : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
RequestedOrientation = clsUtilidades.GetScreenOrientation();
}
}
Then all your activities must inherit this class instead Activity
Somehting like
[Activity(Label = "Orders", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.Mcc | ConfigChanges.Mnc)]
public class ActOrders : ActBase
{
....
This way avoids call the ActivityHelper in your events