I have a simple list of strings that I populate into an Adapter per the following code (using Mono for Android):
var adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleSpinnerItem, DBHelper.AircraftTypes);
adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
_aircraftType.Adapter = adapter;
DBHelper.AircraftTypes returns the List for the adapter. I have this setup in two different activities and it significantly delays the showing of the activity. I can certainly use my “Loading…” activity and then once the activity is loaded use another SetContentView but I hate to do that if there is something I can do to improve spinner initializing performance.
Is there a reason for such a slow load of a spinner to show a simple string list of maybe 10-20 items? I would love to find a way to improve performance as this is the one control that causes this problem.
Thank you.
Could be a problem only when running in debug, in release mode it seems better plus some rearchitecting to help this situation by loading the collection in the Application class and persisting it.