private static void StartBootstrapperCallback(object state) { var activityBase = (SplashScreenActivityBase)state; Exception exception = null; try { if (_bootstrapper == null) { _bootstrapper = activityBase.CreateBootstrapper(); } _bootstrapper.Start(); } catch (Exception e) { Tracer.Error(e.Flatten(true)); exception = e; } finally { activityBase.OnBootstrapperStarted(_bootstrapper, exception); Current = null; _state = DefaultState; } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); var content = _viewId.HasValue ? LayoutInflater.Inflate(_viewId.Value, null) : CreateDefaultView(); if (content != null) { SetContentView(content); } if (Interlocked.Exchange(ref _state, StartedState) == DefaultState) { Current = this; if (AndroidBootstrapperBase.Current != null && AndroidBootstrapperBase.Current.IsInitialized) { StartBootstrapperCallback(this); } else { ThreadPool.QueueUserWorkItem(StartBootstrapperCallback, this); } } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Application.SynchronizationContext.Post(SetContentViewAsync, this); if (Interlocked.Exchange(ref _state, StartedState) == DefaultState) { Current = this; if (_bootstrapper == null) _bootstrapper = BootstrapperBase.Current as AndroidBootstrapperBase; if (_bootstrapper == null) ThreadPool.QueueUserWorkItem(StartBootstrapperCallback, this); else StartBootstrapperCallback(this); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); View content = _viewId.HasValue ? LayoutInflater.Inflate(_viewId.Value, null) : CreateDefaultView(); if (content != null) SetContentView(content); if (Interlocked.Exchange(ref _state, StartedState) == DefaultState) { Current = this; if (_bootstrapper == null) _bootstrapper = BootstrapperBase.Current as AndroidBootstrapperBase; if (_bootstrapper == null) ThreadPool.QueueUserWorkItem(StartBootstrapperCallback, this); else StartBootstrapperCallback(this); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Application.SynchronizationContext.Post(SetContentViewAsync, this); if (Interlocked.Exchange(ref _state, StartedState) == DefaultState) { Current = this; if (_bootstrapper == null) { _bootstrapper = BootstrapperBase.Current as AndroidBootstrapperBase; } if (_bootstrapper == null) { ThreadPool.QueueUserWorkItem(StartBootstrapperCallback, this); } else { StartBootstrapperCallback(this); } } }
private static void StartBootstrapperCallback(object state) { var activityBase = (SplashScreenActivityBase)state; Exception exception = null; try { if (_bootstrapper == null) _bootstrapper = activityBase.CreateBootstrapper(); _bootstrapper.Start(); } catch (Exception e) { Tracer.Error(e.Flatten(true)); exception = e; } finally { activityBase.OnBootstrapperStarted(_bootstrapper, exception); Current = null; _state = DefaultState; } }