This code just works on iOS
public TimelineView ()
{
if (!App.ParseLogin.IsAuthenticated ()) {
this.Navigation.PushModalAsync (new NavigationPage(new SignUpPage()));
}
BindingContext = new TimelineViewModel ();
this.ItemsSource = ViewModel.FeedItems;
this.ItemTemplate = new DataTemplate (() => new MemoryPage ());
}
On Android it throws this exception:
E/mono (17098): Unhandled Exception:
E/mono (17098): System.ArgumentNullException: Argument cannot be null.
E/mono (17098): Parameter name: page
E/mono (17098): at Xamarin.Forms.MultiPage1[Xamarin.Forms.ContentPage].GetIndex (Xamarin.Forms.ContentPage page) [0x00000] in <filename unknown>:0 E/mono (17098): at Xamarin.Forms.Platform.Android.CarouselPageAdapter.UpdateCurrentItem () [0x00000] in <filename unknown>:0 E/mono (17098): at Xamarin.Forms.Platform.Android.CarouselPageRenderer.OnAttachedToWindow () [0x00000] in <filename unknown>:0 E/mono (17098): at Android.Views.View.n_OnAttachedToWindow (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:12399 E/mono (17098): at (wrapper dynamic-method) object:e48d3aeb-f6d6-48c2-8c47-0a5235f6424c (intptr,intptr) E/mono-rt (17098): [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null. E/mono-rt (17098): Parameter name: page E/mono-rt (17098): at Xamarin.Forms.MultiPage
1[Xamarin.Forms.ContentPage].GetIndex (Xamarin.Forms.ContentPage page) [0x00000] in :0
E/mono-rt (17098): at Xamarin.Forms.Platform.Android.CarouselPageAdapter.UpdateCurrentItem () [0x00000] in :0
E/mono-rt (17098): at Xamarin.Forms.Platform.Android.CarouselPageRenderer.OnAttachedToWindow () [0x00000] in :0
E/mono-rt (17098): at Android.Views.View.n_OnAttachedToWindow (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.12-series/41933531/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:12399
E/mono-rt (17098): at (wrapper dynamic-method) object:e48d3aeb-f6d6-48c2-8c47-0a5235f6424c (intptr,intptr)