/// <summary> /// Initialize the messaging service. /// </summary> /// <param name="application">The application.</param> /// <param name="messagingService">A custom messaging service.</param> /// <param name="activityLifecycleCallbacks">Custom activity lifecycle callbacks.</param> public static void Init(Application application, IMessagingService messagingService, IDialogMessagingActivityLifecycleCallbacks activityLifecycleCallbacks) { if (InterceptingService.Instance == null) { InterceptingService.Init(); } // Register an event handler so that we can notify the messaging service about inflated views. InterceptingService.Instance.ViewInflated += InterceptingService_ViewInflated; DroidInit.Init(application, messagingService, activityLifecycleCallbacks); }
public override void OnCreate() { base.OnCreate(); // Initialize the intercepting service. InterceptingService.Init(); // Provide the intercepting service with a custom intercepting delegate. // This allows us to be notified when views are about to be, and after they have been inflated. // The delegate also allows us to control whether certain views should be allowed to be inflated. InterceptingService.Delegate = new InterceptingDelegate(); // Enable the storing of the layout resource ID as the tag on inflated views. InterceptingService.StoreLayoutResID = true; }