[mono-android] Android Spinner: Cannot cast from source type to destination type

2012-09-18 Thread hugoterelle
Hi all, I have a problem using the Android "Spinner". I put an objects collection into that component: List myList = ... ; var sp = View.FindViewById(id); var adapter = new ArrayAdapter(View.Context, Android.Resource.Layout.SimpleSpinnerItem); adap

Re: [mono-android] Android Spinner: Cannot cast from source type to destination type

2012-09-19 Thread hugoterelle
Hi Jon,Thank you very much for your answer. I already saw this post, but what made me think it was different, is the Visual Studio 2010 Debugger.Below, find a screenshot of the code and the values of the "sp.SelectedItem".

Re: [mono-android] Android Spinner: Cannot cast from source type to destination type

2012-09-19 Thread hugoterelle
OK, thank you for your explanation. 2012/9/19 Jonathan Pryor-2 [via Mono for Android] < ml-node+s1047100n5711899...@n5.nabble.com> > On Sep 18, 2012, at 5:38 PM, hugoterelle <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5711899&i=0>> > wrote: >

Re: [mono-android] Listview - Select (Highlight) a row programmatically

2012-10-05 Thread hugoterelle
Hi, I have the same problem and the only solution I found is ListView list = ... list.SetSelection(5); list.PerformItemClick(list.Parent as View, 5, 5); But if there is a ItemClick handler on that list, it will be fired ... Well, is there someone who have a better solution? Hugo --