In my shared code project application I'm using something similar to this:
List<string> data = new List<string> { "1", "2", "3", "4", "5", "6", "7" };
ListView lv = new ListView()
{
BackgroundColor = Color.Silver
,ItemsSource = data
,RowHeight = ScreenHeight / 6
};
MainPage = new ContentPage
{
Content = new TableView()
{
BackgroundColor = Color.White,
RowHeight = ScreenHeight / 3,
Root = new TableRoot("")
{
new TableSection("")
{
new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
,new ViewCell(){View =lv}
}
}
}
};
It's all fun and games until I try to scroll on any kind of android emulator or device: then sometimes I get nasty exceptions that starts with:
"System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 3b900039 ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.ListViewAdapter::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown."
If anyone is interested I added all exception text as .txt file.
The question here is: Do I do anything wrong here? And how to cure it?
Working environment:
Visual Studio 2013
Xamarin 3.11.836.0
Xamarin.Android 5.1.5.3
Xamarin.iOS 8.10.4.0
Xamarin.Forms.Core shows version 1.4.0.0