Skip to content

Commit 8e9d2b2

Browse files
committed
Improve comments about setup on Android Activity classes
1 parent 9b8b5fc commit 8e9d2b2

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

MvvmCross.Forms/Platforms/Android/Views/MvxFormsAppCompatActivity.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ protected override void AttachBaseContext(Context @base)
9797

9898
protected override void OnCreate(Bundle bundle)
9999
{
100+
// ensuring mvvmcross is running here is required
101+
// otherwise app will crash when inflating the view because of the Forms base class
100102
var setup = MvxAndroidSetupSingleton.EnsureSingletonAvailable(ApplicationContext);
101103
setup.EnsureInitialized();
102104

MvvmCross.Forms/Platforms/Android/Views/MvxFormsApplicationActivity.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ protected override void AttachBaseContext(Context @base)
9595

9696
protected override void OnCreate(Bundle bundle)
9797
{
98-
// Required for proper Push notifications handling
98+
// ensuring mvvmcross is running here is required
99+
// otherwise app will crash when inflating the view because of the Forms base class
99100
var setup = MvxAndroidSetupSingleton.EnsureSingletonAvailable(ApplicationContext);
100101
setup.EnsureInitialized();
101102

MvvmCross/Platforms/Android/Views/MvxActivityViewExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private static void EnsureSetupInitialized(this IMvxAndroidView androidView)
139139
{
140140
if (androidView is IMvxSetupMonitor)
141141
{
142-
// splash screen views manage their own setup initialization
142+
// setup monitor views manage their own setup initialization
143143
return;
144144
}
145145

0 commit comments

Comments
 (0)